summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2010-06-08 12:27:19 (GMT)
committerJonny Lamb <jonny.lamb@collabora.co.uk>2010-06-08 12:27:19 (GMT)
commit637318774aff25dbd66227fa4dafdf23b1b65eba (patch)
tree6996230ed396df90f1cbb483646f6085cd5597a2
parentacd7e513f549fa4471f0e2e2b3a10c5b5fe51b4a (diff)
downloadtelepathy-butterfly-637318774aff25dbd66227fa4dafdf23b1b65eba.tar.gz
telepathy-butterfly-637318774aff25dbd66227fa4dafdf23b1b65eba.tar.xz
text channel: don't always remove pending messages when ListPendingMessages is called
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
-rw-r--r--butterfly/channel/text.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/butterfly/channel/text.py b/butterfly/channel/text.py
index 03bc82d..c980e23 100644
--- a/butterfly/channel/text.py
+++ b/butterfly/channel/text.py
@@ -243,9 +243,11 @@ class ButterflyTextChannel(
self.PendingMessagesRemoved(ids)
def ListPendingMessages(self, clear):
- ids = self._pending_messages2.keys()
- self._pending_messages2 = {}
- self.PendingMessagesRemoved(ids)
+ if clear:
+ ids = self._pending_messages2.keys()
+ self._pending_messages2 = {}
+ self.PendingMessagesRemoved(ids)
+
return telepathy.server.ChannelTypeText.ListPendingMessages(self, clear)
# Redefine GetSelfHandle since we use our own handle