From 68c4f208990803021f289d927eb72dfe4e762a68 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Thu, 08 May 2008 13:09:17 +0000 Subject: Handle pending messages when setting the message handler --- (limited to 'pippy_app.py') diff --git a/pippy_app.py b/pippy_app.py index 2e6e5a0..c038b49 100644 --- a/pippy_app.py +++ b/pippy_app.py @@ -454,6 +454,11 @@ class TextChannelWrapper(object): self._text_chan[CHANNEL_TYPE_TEXT].connect_to_signal('Received', self._received_cb) + # handle pending messages + for id, timestamp, sender, type, flags, text in \ + self._text_chan[CHANNEL_TYPE_TEXT].ListPendingMessages(True): + self._received_cb(id, timestamp, sender, type, flags, text) + def _received_cb(self, id, timestamp, sender, type, flags, text): """Handle received text from the text channel. -- cgit v0.9.1