diff options
author | mathieui <mathieui@mathieui.net> | 2014-04-27 16:32:03 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2014-04-27 16:32:03 +0200 |
commit | 5999b71c416f02dc11803bf52a406b9109ddc3c1 (patch) | |
tree | e132ffeb929d23b94ee4ed2261be5bc8498815c1 /src/tabs | |
parent | 60224bb76a08d5332e1d0bca810cf9682d45aa89 (diff) | |
download | poezio-5999b71c416f02dc11803bf52a406b9109ddc3c1.tar.gz poezio-5999b71c416f02dc11803bf52a406b9109ddc3c1.tar.bz2 poezio-5999b71c416f02dc11803bf52a406b9109ddc3c1.tar.xz poezio-5999b71c416f02dc11803bf52a406b9109ddc3c1.zip |
Fix #2106 (implement message delivery receipts)
- two options request/ack_message_receipts
- two new theme parameters : CHAR_ACK_RECEIVED and COLOR_CHAR_ACK
- if a message has a receipt, the character is displayed between the
timestamp and the nick, using the color
Diffstat (limited to 'src/tabs')
-rw-r--r-- | src/tabs/basetabs.py | 9 | ||||
-rw-r--r-- | src/tabs/conversationtab.py | 4 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/tabs/basetabs.py b/src/tabs/basetabs.py index 1e7564dc..2811ba66 100644 --- a/src/tabs/basetabs.py +++ b/src/tabs/basetabs.py @@ -496,6 +496,15 @@ class ChatTab(Tab): identifier=identifier, jid=jid) + def ack_message(self, msg_id): + """ + Ack a message + """ + new_msg = self._text_buffer.ack_message(msg_id) + if new_msg: + self.text_win.modify_message(msg_id, new_msg) + self.core.refresh_window() + def modify_message(self, txt, old_id, new_id, user=None, jid=None, nickname=None): self.log_message(txt, nickname, typ=1) message = self._text_buffer.modify_message(txt, old_id, new_id, time=time, user=user, jid=jid) diff --git a/src/tabs/conversationtab.py b/src/tabs/conversationtab.py index ce60689c..51262db0 100644 --- a/src/tabs/conversationtab.py +++ b/src/tabs/conversationtab.py @@ -219,7 +219,9 @@ class ConversationTab(ChatTab): msg.send() def check_attention(self): - self.core.xmpp.plugin['xep_0030'].get_info(jid=self.get_dest_jid(), block=False, timeout=5, callback=self.on_attention_checked) + self.core.xmpp.plugin['xep_0030'].get_info( + jid=self.get_dest_jid(), block=False, timeout=5, + callback=self.on_attention_checked) def on_attention_checked(self, iq): if 'urn:xmpp:attention:0' in iq['disco_info'].get_features(): |