1
0
Fork 0
forked from sch/KaikOut

Check self presence upon an invitation to a group chat.

This commit is contained in:
Schimon Jehudah, Adv. 2024-11-19 11:11:49 +02:00
parent 39b0cffe66
commit a02cc5a7a4

View file

@ -148,6 +148,9 @@ class XmppClient(slixmpp.ClientXMPP):
.format(self.alias, self.boundjid.bare)) .format(self.alias, self.boundjid.bare))
XmppMessage.send(self, room, message_body, 'groupchat') XmppMessage.send(self, room, message_body, 'groupchat')
XmppStatus.send_status_message(self, room) XmppStatus.send_status_message(self, room)
self.add_event_handler("muc::%s::got_online" % room, self.on_muc_got_online)
self.add_event_handler("muc::%s::presence" % room, self.on_muc_presence)
self.add_event_handler("muc::%s::self-presence" % room, self.on_muc_self_presence)
async def on_groupchat_direct_invite(self, message): async def on_groupchat_direct_invite(self, message):
@ -164,6 +167,9 @@ class XmppClient(slixmpp.ClientXMPP):
.format(self.boundjid.bare)) .format(self.boundjid.bare))
XmppMessage.send(self, room, message_body, 'groupchat') XmppMessage.send(self, room, message_body, 'groupchat')
XmppStatus.send_status_message(self, room) XmppStatus.send_status_message(self, room)
self.add_event_handler("muc::%s::got_online" % room, self.on_muc_got_online)
self.add_event_handler("muc::%s::presence" % room, self.on_muc_presence)
self.add_event_handler("muc::%s::self-presence" % room, self.on_muc_self_presence)
async def on_message(self, message): async def on_message(self, message):