mirror of
https://github.com/matrix-org/pantalaimon.git
synced 2024-10-01 03:35:38 -04:00
client: Remove unused encrypt function.
This commit is contained in:
parent
aa1143328f
commit
cd5565b4b3
@ -3,7 +3,7 @@ from pprint import pformat
|
||||
from typing import Any, Dict, Optional
|
||||
|
||||
from nio import (AsyncClient, ClientConfig, EncryptionError,
|
||||
GroupEncryptionError, KeysQueryResponse, MegolmEvent,
|
||||
KeysQueryResponse, MegolmEvent,
|
||||
RoomEncryptedEvent, SyncResponse,
|
||||
KeyVerificationEvent, LocalProtocolError,
|
||||
KeyVerificationStart, KeyVerificationKey, KeyVerificationMac)
|
||||
@ -207,21 +207,6 @@ class PanClient(AsyncClient):
|
||||
self.task.cancel()
|
||||
await self.task
|
||||
|
||||
async def encrypt(self, room_id, msgtype, content):
|
||||
try:
|
||||
return super().encrypt(
|
||||
room_id,
|
||||
msgtype,
|
||||
content
|
||||
)
|
||||
except GroupEncryptionError:
|
||||
await self.share_group_session(room_id)
|
||||
return super().encrypt(
|
||||
room_id,
|
||||
msgtype,
|
||||
content
|
||||
)
|
||||
|
||||
def pan_decrypt_event(
|
||||
self,
|
||||
event_dict,
|
||||
|
Loading…
Reference in New Issue
Block a user