Changeset 8629 for branches/gajim_0.11.1/src/common
- Timestamp:
- 08/30/07 22:28:21 (15 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/gajim_0.11.1/src/common/connection_handlers.py
r8620 r8629 654 654 iq.setAttr('id', id) 655 655 query = iq.setTag('query') 656 # bytestream transfers 657 feature = common.xmpp.Node('feature') 658 feature.setAttr('var', common.xmpp.NS_BYTESTREAM) 659 query.addChild(node=feature) 660 # si methods 661 feature = common.xmpp.Node('feature') 662 feature.setAttr('var', common.xmpp.NS_SI) 663 query.addChild(node=feature) 664 # filetransfers transfers 665 feature = common.xmpp.Node('feature') 666 feature.setAttr('var', common.xmpp.NS_FILE) 667 query.addChild(node=feature) 668 # exposing adhoc commands 669 feature = common.xmpp.Node('feature') 670 feature.setAttr('var', common.xmpp.NS_COMMANDS) 671 query.addChild(node=feature) 656 query.setAttr('node','http://gajim.org/caps#' + gajim.version) 657 for f in (common.xmpp.NS_BYTESTREAM, common.xmpp.NS_SI, \ 658 common.xmpp.NS_FILE, common.xmpp.NS_COMMANDS): 659 feature = common.xmpp.Node('feature') 660 feature.setAttr('var', f) 661 query.addChild(node=feature) 672 662 673 663 self.connection.send(iq) … … 732 722 iq = iq_obj.buildReply('result') 733 723 q = iq.getTag('query') 724 if node: 725 q.setAttr('node', node) 734 726 q.addChild('identity', attrs = {'type': 'pc', 'category': 'client', 735 727 'name': 'Gajim'}) … … 739 731 client_version = 'http://gajim.org/caps#' + gajim.version 740 732 741 if node in (None, client_version) or extension == 'ftrans':733 if node in (None, client_version): 742 734 q.addChild('feature', attrs = {'var': common.xmpp.NS_BYTESTREAM}) 743 735 q.addChild('feature', attrs = {'var': common.xmpp.NS_SI}) 744 736 q.addChild('feature', attrs = {'var': common.xmpp.NS_FILE}) 745 if node in (None, client_version) or extension == 'xhtml':746 q.addChild('feature', attrs = {'var': common.xmpp.NS_XHTML_IM})747 if node in (None, client_version):748 737 q.addChild('feature', attrs = {'var': common.xmpp.NS_MUC}) 749 q.addChild('feature', attrs = {'var': common.xmpp.NS_CHATSTATES})750 738 q.addChild('feature', attrs = {'var': common.xmpp.NS_COMMANDS}) 751 739 q.addChild('feature', attrs = {'var': common.xmpp.NS_DISCO_INFO}) 740 741 if (node is None or extension == 'cstates') and gajim.config.get('outgoing_chat_state_notifactions') != 'disabled': 742 q.addChild('feature', attrs = {'var': common.xmpp.NS_CHATSTATES}) 743 744 if (node is None or extension == 'xhtml') and not gajim.config.get('ignore_incoming_xhtml'): 745 q.addChild('feature', attrs = {'var': common.xmpp.NS_XHTML_IM}) 752 746 753 747 if q.getChildren(): … … 831 825 c = p.setTag('c', namespace = common.xmpp.NS_CAPS) 832 826 c.setAttr('node', 'http://gajim.org/caps') 833 c.setAttr('ext', 'ftrans xhtml') 827 ext = [] 828 if not gajim.config.get('ignore_incoming_xhtml'): 829 ext.append('xhtml') 830 if gajim.config.get('outgoing_chat_state_notifactions') != 'disabled': 831 ext.append('cstates') 832 833 if len(ext): 834 c.setAttr('ext', ' '.join(ext)) 834 835 c.setAttr('ver', gajim.version) 835 836 return p
