Disable presence and read receipt bridging for bots. Fixes #194
This commit is contained in:
@@ -659,6 +659,8 @@ class Portal:
|
||||
SetTypingRequest(self.peer, action() if typing else SendMessageCancelAction()))
|
||||
|
||||
async def mark_read(self, user, event_id):
|
||||
if user.is_bot:
|
||||
return
|
||||
space = self.tgid if self.peer_type == "channel" else user.tgid
|
||||
message = DBMessage.query.filter(DBMessage.mxid == event_id,
|
||||
DBMessage.mx_room == self.mxid,
|
||||
|
||||
@@ -190,6 +190,8 @@ class User(AbstractUser):
|
||||
return super().ensure_started(even_if_no_session)
|
||||
|
||||
def set_presence(self, online: bool = True):
|
||||
if self.is_bot:
|
||||
return
|
||||
return self.client(UpdateStatusRequest(offline=not online))
|
||||
|
||||
async def update_info(self, info: User = None):
|
||||
|
||||
Reference in New Issue
Block a user