catch exception if message was not delivered to XMPP
This commit is contained in:
parent
02b45a233e
commit
0c199a8231
|
@ -285,6 +285,7 @@ class Session(YowsupApp):
|
|||
self.logger.info("Message received from %s to %s: %s (at ts=%s)" %
|
||||
(buddy, self.legacyName, messageContent, timestamp))
|
||||
|
||||
try:
|
||||
if participant is not None: # Group message or broadcast
|
||||
partname = participant.split('@')[0]
|
||||
if _from.split('@')[1] == 'broadcast': # Broadcast message
|
||||
|
@ -297,6 +298,8 @@ class Session(YowsupApp):
|
|||
timestamp, notify)
|
||||
else:
|
||||
self.sendMessageToXMPP(buddy, messageContent, timestamp)
|
||||
except Exception as ex:
|
||||
self.logger.error("textMessage not delivered to XMPP: %s" % ex)
|
||||
|
||||
# Called by superclass
|
||||
def onImage(self, image):
|
||||
|
|
Loading…
Reference in a new issue