Slixfeed/slixfeed/xmpp/status.py

20 lines
476 B
Python
Raw Normal View History

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
2024-02-06 04:04:43 +01:00
from slixfeed.xmpp.utility import get_chat_type
class XmppStatus:
async def send(self, jid, status_message, status_type=None, chat_type=None):
if not chat_type:
chat_type = await get_chat_type(self, jid)
self.send_presence(
pto=jid,
pfrom=self.boundjid.bare,
pshow=status_type,
pstatus=status_message,
ptype=chat_type
)