766e51af4c
Add packaging instructions; Add modules to handle Gemini file type (no Gemini server yet); Improve handling of configuration.
27 lines
795 B
Python
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)
|