prosodyclient: Add API to import XEP-0227 account data

This commit is contained in:
Matthew Wild
2022-01-12 16:19:10 +00:00
committed by Jonas Schäfer
parent 481379d03f
commit 3cb8185b1a

View File

@@ -1138,6 +1138,20 @@ class ProsodyClient:
return None
return await resp.text()
@autosession
async def import_account_data(
self,
user_xml: str,
*,
session: aiohttp.ClientSession,
) -> bool:
async with session.post(
self._xep227_endpoint("/import?stores=roster,vcard,pep"),
data=user_xml,
) as resp:
self._raise_error_from_response(resp)
return True
@autosession
async def revoke_token(
self,