Fix a bug where a single long sms message is sent as multiple… (#34508)
This commit is contained in:
parent
0d598dd6d6
commit
b73c774b07
1 changed files with 4 additions and 8 deletions
|
@ -48,15 +48,11 @@ class SMSNotificationService(BaseNotificationService):
|
|||
|
||||
# Send messages
|
||||
for encoded_message in encoded:
|
||||
# Prepare message data
|
||||
gammu_message = {
|
||||
"Text": encoded_message["Text"],
|
||||
# We tell that we want to use first SMSC number stored in phone
|
||||
"SMSC": {"Location": 1},
|
||||
"Number": self.number,
|
||||
}
|
||||
# Fill in numbers
|
||||
encoded_message["SMSC"] = {"Location": 1}
|
||||
encoded_message["Number"] = self.number
|
||||
try:
|
||||
# Actually send the message
|
||||
self.gateway.SendSMS(gammu_message)
|
||||
self.gateway.SendSMS(encoded_message)
|
||||
except gammu.GSMError as exc: # pylint: disable=no-member
|
||||
_LOGGER.error("Sending to %s failed: %s", self.number, exc)
|
||||
|
|
Loading…
Add table
Reference in a new issue