From 74f0cea2305b59a09a393fb9bd08d3fe0e998e90 Mon Sep 17 00:00:00 2001 From: udf Date: Wed, 21 Nov 2018 23:24:33 +0200 Subject: [PATCH] Fix ninja in saved messages I'm not sure why you'd use ninja in your own chat, but it shouldn't raise anyways. --- stdplugins/ninja.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stdplugins/ninja.py b/stdplugins/ninja.py index d9ebaae..42688e9 100644 --- a/stdplugins/ninja.py +++ b/stdplugins/ninja.py @@ -5,6 +5,7 @@ import asyncio from telethon import events +from telethon.tl.types import InputPeerSelf import telethon.utils from uniborg import util @@ -20,6 +21,8 @@ async def get_target_message(event): async def await_read(chat, message): + if isinstance(chat, InputPeerSelf): + return chat = telethon.utils.get_peer_id(chat) async def read_filter(read_event):