From 42f8c079c3e557b5a95440a1dcd9137a89f1db45 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Wed, 18 Oct 2017 23:51:33 +0200 Subject: [PATCH] Revert "catch exception if message was not delivered to XMPP" This reverts commit 0c199a823170e1e83b6aabf5b2ff776f1ea8af4e. --- transWhat/session.py | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/transWhat/session.py b/transWhat/session.py index 473a1a3..f02bf5f 100644 --- a/transWhat/session.py +++ b/transWhat/session.py @@ -285,21 +285,18 @@ 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 - message = self.broadcast_prefix + messageContent - self.sendMessageToXMPP(partname, message, timestamp) - else: # Group message - if notify is None: - notify = "" - self.sendGroupMessageToXMPP(buddy, partname, messageContent, - timestamp, notify) - else: - self.sendMessageToXMPP(buddy, messageContent, timestamp) - except Exception as ex: - self.logger.error("textMessage not delivered to XMPP: %s" % ex) + if participant is not None: # Group message or broadcast + partname = participant.split('@')[0] + if _from.split('@')[1] == 'broadcast': # Broadcast message + message = self.broadcast_prefix + messageContent + self.sendMessageToXMPP(partname, message, timestamp) + else: # Group message + if notify is None: + notify = "" + self.sendGroupMessageToXMPP(buddy, partname, messageContent, + timestamp, notify) + else: + self.sendMessageToXMPP(buddy, messageContent, timestamp) # Called by superclass def onImage(self, image):