XMPP version example for XMPPpy

Материал из Linux Wiki
Версия от 20:51, 11 марта 2023; Rain (обсуждение | вклад) (Новая страница: «<source lang=python> def iq_version_handler(self, iq): name = Node('name') name.setData("Jabber Weather Service") version = Node('version') version.setData(self.version) repl = iq.buildReply('result') query = xmpp.Node('query', attrs={'xmlns':xmpp.NS_VERSION}) query.addChild(node=name) query.addChild(node=version) repl.setPayload([query]) self.jabber.send(repl) raise...»)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к навигацииПерейти к поиску
    def iq_version_handler(self, iq):
        name = Node('name')
        name.setData("Jabber Weather Service")
        version = Node('version')
        version.setData(self.version)

        repl = iq.buildReply('result')
        query = xmpp.Node('query', attrs={'xmlns':xmpp.NS_VERSION})
        query.addChild(node=name)
        query.addChild(node=version)
        repl.setPayload([query])
        self.jabber.send(repl)
        raise NodeProcessed