From 4b683129d42a3831e9977eedeb10eff5ca4b9784 Mon Sep 17 00:00:00 2001 From: blank X Date: Fri, 6 Nov 2020 00:58:23 +0700 Subject: [PATCH] Add chat link to User Add/Join Events if possible --- sukuinote/plugins/user_joins.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sukuinote/plugins/user_joins.py b/sukuinote/plugins/user_joins.py index abda155..1cd8a5b 100644 --- a/sukuinote/plugins/user_joins.py +++ b/sukuinote/plugins/user_joins.py @@ -35,7 +35,11 @@ async def log_user_joins(client, update, users, chats): raise ContinuePropagation if not is_join and not config['config']['log_user_adds']: raise ContinuePropagation - text = f"{'User Join Event' if is_join else 'User Add Event'}\n- Chat: {html.escape(chats[chat_id].title)} [{sexy_chat_id}]\n" + text = f"{'User Join Event' if is_join else 'User Add Event'}\n- Chat: " + atext = html.escape(chats[chat_id].title) + if getattr(chats[chat_id], 'username', None): + atext = f'atext' + text += f"{atext} [{sexy_chat_id}]\n" async with lock: if (sexy_chat_id, message.id) not in handled: if is_join: