Implement Matrix->Telegram read receipts

This commit is contained in:
Tulir Asokan
2018-07-22 17:27:56 -04:00
parent e4e100a184
commit af46aee191
3 changed files with 33 additions and 11 deletions
-5
View File
@@ -22,7 +22,6 @@ import re
from telethon.tl.types import *
from telethon.tl.types.contacts import ContactsNotModified
from telethon.tl.functions.contacts import GetContactsRequest, SearchRequest
from telethon.tl.functions.messages import SetTypingRequest
from mautrix_appservice import MatrixRequestError
from .db import User as DBUser, Contact as DBContact
@@ -204,10 +203,6 @@ class User(AbstractUser):
if changed:
self.save()
def set_typing(self, peer, typing=True, action=SendMessageTypingAction):
return self.client(
SetTypingRequest(peer, action() if typing else SendMessageCancelAction()))
async def log_out(self):
for _, portal in self.portals.items():
if portal.has_bot: