diff --git a/butterfly/channel/im.py b/butterfly/channel/im.py index 01a76af..f81e495 100644 --- a/butterfly/channel/im.py +++ b/butterfly/channel/im.py @@ -193,9 +193,8 @@ class ButterflyImChannel(ButterflyTextChannel): handle = self._conn.ensure_contact_handle(sender) type = telepathy.CHANNEL_TEXT_MESSAGE_TYPE_NORMAL logger.info("User %r sent a offline message" % handle) - self._signal_text_received(id, timestamp, handle, type, 0, message.display_name, text) - self._recv_id += 1 + self._signal_text_received(id, timestamp, handle, type, 0, message.display_name, text) def attach_conversation(self, conversation): # @conversation a papyon.ConversationInterface diff --git a/butterfly/channel/text.py b/butterfly/channel/text.py index 8a425f0..dbcd562 100644 --- a/butterfly/channel/text.py +++ b/butterfly/channel/text.py @@ -288,8 +288,8 @@ class ButterflyTextChannel( logger.info("User %s sent a message" % unicode(handle)) content = re.sub('\r\n', '\n', message.content) content = re.sub('\r', '\n', content) - self._signal_text_received(id, timestamp, handle, type, 0, message.display_name, content) self._recv_id += 1 + self._signal_text_received(id, timestamp, handle, type, 0, message.display_name, content) # papyon.event.ConversationEventInterface def on_conversation_nudge_received(self, sender):