Changeset 20:480ba9e6ee3c


Ignore:
Timestamp:
Apr 22, 2008, 2:49:53 PM (12 years ago)
Author:
Ralph Meijer <ralphm@…>
Branch:
default
Convert:
svn:b33ecbfc-034c-dc11-8662-000475d9059e/trunk@50
Message:

Fix broken version handler.

Location:
wokkel
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • wokkel/generic.py

    r11 r20  
    1 # Copyright (c) 2003-2007 Ralph Meijer
     1# -*- test-case-name: wokkel.test.test_generic -*-
     2#
     3# Copyright (c) 2003-2008 Ralph Meijer
    24# See LICENSE for details.
    35
     
    1012from twisted.internet import defer
    1113from twisted.words.protocols.jabber import error
     14from twisted.words.protocols.jabber.xmlstream import toResponse
    1215
    1316from wokkel import disco
     
    4144
    4245
     46
    4347class VersionHandler(XMPPHandler):
    4448    """
     
    5963
    6064    def onVersion(self, iq):
    61         response = iq.toResponse(iq, "result")
     65        response = toResponse(iq, "result")
    6266
    63         query = iq.addElement((NS_VERSION, "query"))
     67        query = response.addElement((NS_VERSION, "query"))
    6468        name = query.addElement("name", content=self.name)
    65         version = iq.addElement("version", content=self.version)
    66         self.send(iq)
     69        version = query.addElement("version", content=self.version)
     70        self.send(response)
    6771
    6872        iq.handled = True
Note: See TracChangeset for help on using the changeset viewer.