diff --git a/hydrogram/parser/utils.py b/hydrogram/parser/utils.py index ca849ef68..5afe46e11 100644 --- a/hydrogram/parser/utils.py +++ b/hydrogram/parser/utils.py @@ -27,8 +27,9 @@ def add_surrogates(text): # Replace each SMP code point with a surrogate pair return SMP_RE.sub( - lambda match: # Split SMP in two surrogates - "".join(chr(i) for i in unpack(" Chat: if isinstance(channel, raw.types.ChannelForbidden): return Chat( id=peer_id, - type=enums.ChatType.SUPERGROUP if getattr(channel, 'megagroup', False) else enums.ChatType.CHANNEL, + type=enums.ChatType.SUPERGROUP + if getattr(channel, "megagroup", False) + else enums.ChatType.CHANNEL, title=channel.title, client=client, )