diff options
author | Yann Leboulanger <asterix@lagaule.org> | 2011-08-28 00:41:55 +0400 |
---|---|---|
committer | Yann Leboulanger <asterix@lagaule.org> | 2011-08-28 00:41:55 +0400 |
commit | 98432f6666167a15443726a453a5602fdb0f30de (patch) | |
tree | 07a528eca487cebf2131349d23d9350f6bc1c7a7 /plugins | |
parent | 36af66b063c44a5cf159b4d85375fc97d41f792f (diff) |
cean chatstate code: remove XEP-0022 support and use caps to know if a contact supports it
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/banner_tweaks/plugin.py | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/plugins/banner_tweaks/plugin.py b/plugins/banner_tweaks/plugin.py index a100cfe45..2e7faeb31 100644 --- a/plugins/banner_tweaks/plugin.py +++ b/plugins/banner_tweaks/plugin.py @@ -135,27 +135,17 @@ class BannerTweaksPlugin(GajimPlugin): if cs and st in ('composing_only', 'all'): if contact.show == 'offline': chatstate = '' - elif contact.composing_xep == 'XEP-0085': - if st == 'all' or cs == 'composing': - chatstate = helpers.get_uf_chatstate(cs) - else: - chatstate = '' - elif contact.composing_xep == 'XEP-0022': - if cs in ('composing', 'paused'): - # only print composing, paused - chatstate = helpers.get_uf_chatstate(cs) - else: - chatstate = '' - else: - # When does that happen ? See [7797] and [7804] + elif st == 'all' or cs == 'composing': chatstate = helpers.get_uf_chatstate(cs) + else: + chatstate = '' label_text = '<span %s>%s</span><span %s>%s %s</span>' % \ - (font_attrs, name, font_attrs_small, acct_info, chatstate) + (font_attrs, name, font_attrs_small, acct_info, chatstate) else: # weight="heavy" size="x-large" label_text = '<span %s>%s</span><span %s>%s</span>' % \ - (font_attrs, name, font_attrs_small, acct_info) + (font_attrs, name, font_attrs_small, acct_info) banner_name_label.set_markup(label_text) |