WIP: implement setting circle avatar

missing: actually doing the thing, we get forbidden back because the
role doesn't propagate to groups.$SNIKKET_DOMAIN

Fixes #49.
This commit is contained in:
Jonas Schäfer
2023-03-28 21:47:24 +02:00
parent 49bbc3ab09
commit 788ca73d86
4 changed files with 86 additions and 2 deletions

View File

@@ -1246,3 +1246,23 @@ class ProsodyClient:
json=payload) as resp:
self._raise_error_from_response(resp)
resp.raise_for_status()
@autosession
async def set_muc_avatar(
self,
muc_jid: str,
data: bytes,
mimetype: str,
*,
session: aiohttp.ClientSession,
):
xmpputil.extract_iq_reply(
await self._xml_iq_call(
session,
xmpputil.make_muc_avatar_set_request(
muc_jid,
data,
mimetype,
),
)
)