diff options
author | mathieui <mathieui@mathieui.net> | 2013-06-10 23:49:10 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2013-06-10 23:49:10 +0200 |
commit | 97d3690aea8926f50eed2d5d0194114228c1e3ef (patch) | |
tree | 4ead7642134f3cb7b4542297597ea13c056a487d /src/tabs.py | |
parent | 4220c36021c17dc27136a09041b9c0a47f5e0a57 (diff) | |
download | poezio-97d3690aea8926f50eed2d5d0194114228c1e3ef.tar.gz poezio-97d3690aea8926f50eed2d5d0194114228c1e3ef.tar.bz2 poezio-97d3690aea8926f50eed2d5d0194114228c1e3ef.tar.xz poezio-97d3690aea8926f50eed2d5d0194114228c1e3ef.zip |
Implement Message Carbons (XEP-280)
- Add an option enable_carbons (defaults to false)
- Make a disco on non-roster entites to determine if the message
commes from a muc private chat or not.
Diffstat (limited to 'src/tabs.py')
-rw-r--r-- | src/tabs.py | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/tabs.py b/src/tabs.py index 3d52fcbc..c0a34f29 100644 --- a/src/tabs.py +++ b/src/tabs.py @@ -2220,19 +2220,12 @@ class RosterInfoTab(Tab): desc=_('Informs you of the last activity of a JID.'), shortdesc=_('Get the activity of someone.'), completion=self.core.completion_last_activity) - self.core.xmpp.add_event_handler('session_start', - lambda event: self.core.xmpp.plugin['xep_0030'].get_info( - jid=self.core.xmpp.boundjid.domain, - block=False, timeout=5, callback=self.check_blocking) - ) self.resize() self.update_commands() self.update_keys() - def check_blocking(self, iq): - if iq['type'] == 'error': - return - if 'urn:xmpp:blocking' in iq['disco_info'].get_features(): + def check_blocking(self, features): + if 'urn:xmpp:blocking' in features: self.register_command('block', self.command_block, usage=_('[jid]'), shortdesc=_('Prevent a JID from talking to you.'), |