Rivista/rivista/xmpp/xep_0060.py
Schimon Jehudah, Adv. 3ac005708d Add installation instruction file;
Order directories.
2024-11-12 15:31:05 +02:00

27 lines
795 B
Python

#!/usr/bin/python
# -*- coding: utf-8 -*-
from slixmpp.exceptions import IqError, IqTimeout
class XmppXep0060:
async def get_node_item(self, pubsub, node, item_id):
try:
iq = await self.plugin['xep_0060'].get_item(pubsub, node, item_id, timeout=5)
return iq
except (IqError, IqTimeout) as e:
print(e)
async def get_node_items(self, pubsub, node):
try:
iq = await self.plugin['xep_0060'].get_items(pubsub, node, timeout=5)
return iq
except (IqError, IqTimeout) as e:
print(e)
async def get_nodes(self, pubsub):
try:
iq = await self.plugin['xep_0060'].get_nodes(pubsub, timeout=5)
return iq
except (IqError, IqTimeout) as e:
print(e)