You've already forked snikket-web-portal
prosodyclient: Add API to import XEP-0227 account data
This commit is contained in:
committed by
Jonas Schäfer
parent
481379d03f
commit
3cb8185b1a
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user