client: Remove unused encrypt function.

This commit is contained in:
Damir Jelić 2019-05-07 15:00:51 +02:00
parent aa1143328f
commit cd5565b4b3

View File

@ -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,