delete_session: new API
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
284f49714e
commit
48b0610f89
2 changed files with 8 additions and 1 deletions
|
@ -2,6 +2,7 @@ Version XXX:
|
||||||
2022-XX-XX Maxime “pep” Buquet <pep@bouah.net>
|
2022-XX-XX Maxime “pep” Buquet <pep@bouah.net>
|
||||||
* Improvements:
|
* Improvements:
|
||||||
- Added py.typed to the repository for static type checking tools
|
- Added py.typed to the repository for static type checking tools
|
||||||
|
- New delete_session method
|
||||||
Version 0.6.1:
|
Version 0.6.1:
|
||||||
2022-03-14 Maxime “pep” Buquet <pep@bouah.net>
|
2022-03-14 Maxime “pep” Buquet <pep@bouah.net>
|
||||||
* Improvements:
|
* Improvements:
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from typing import Any, Dict, List, Optional, Set, Tuple, Union
|
from typing import Any, Dict, Iterable, List, Optional, Set, Tuple, Union
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
|
@ -612,6 +612,12 @@ class XEP_0384(BasePlugin):
|
||||||
msg.enable('store')
|
msg.enable('store')
|
||||||
return msg
|
return msg
|
||||||
|
|
||||||
|
async def delete_session(self, jid: JID, device_id: int) -> None:
|
||||||
|
"""
|
||||||
|
Delete the session for the provided jid/device_id pair.
|
||||||
|
"""
|
||||||
|
await self._omemo().deleteSession(jid.bare, device_id)
|
||||||
|
|
||||||
async def trust(self, jid: JID, device_id: int, ik: bytes) -> None:
|
async def trust(self, jid: JID, device_id: int, ik: bytes) -> None:
|
||||||
await self._omemo().setTrust(jid.bare, device_id, ik, True)
|
await self._omemo().setTrust(jid.bare, device_id, ik, True)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue