feat(vcard): add url

このコミットが含まれているのは:
Czar 2022-05-27 03:55:46 +02:00
コミット 3b5781b22d
1個のファイルの変更9行の追加1行の削除

10
main.py
ファイルの表示

@ -227,6 +227,7 @@ class AngelBot(ClientXMPP):
self.register_plugin("xep_0084")
self.register_plugin("xep_0153")
self.register_plugin("xep_0363")
self.register_plugin("xep_0363")
self.add_event_handler("session_start", self.session_start)
self.add_event_handler("message", self.message)
@ -238,6 +239,7 @@ class AngelBot(ClientXMPP):
async def session_start(self, event):
self.send_presence()
await self.get_roster()
await self.update_info()
for channel in self.autojoin:
try:
self.plugin["xep_0045"].join_muc(channel, self.nick)
@ -258,8 +260,14 @@ class AngelBot(ClientXMPP):
"bytes": avatar_bytes,
}
asyncio.gather(self.plugin["xep_0084"].publish_avatar(avatar))
vcard = self.plugin["xep_0054"].make_vcard()
vcard["URL"] = "https://gt.kalli.st/czar/angel"
asyncio.gather(self.plugin["xep_0054"].publish_vcard(vcard))
asyncio.gather(self.plugin["xep_0084"].publish_avatar(avatar))
asyncio.gather(
self.plugin["xep_0153"].set_avatar(
avatar=avatar,