[O] Remove username from text after identifying reply mention

This commit is contained in:
Hykilpikonna 2021-08-05 00:57:22 +08:00
parent 25ec388df8
commit 4e156ae91e
No known key found for this signature in database
GPG Key ID: 256CD01A41D7FA26

View File

@ -56,6 +56,9 @@ def get_users(msg):
username = text[offset : offset + length] username = text[offset : offset + length]
rpl_user = {'first_name': find_name_by_username(username), 'username': username} rpl_user = {'first_name': find_name_by_username(username), 'username': username}
# Remove mention from message text
msg['text'] = text[:offset] + text[offset + length:]
else: else:
rpl_user = {'first_name': '自己', 'id': rpl_user['id']} rpl_user = {'first_name': '自己', 'id': rpl_user['id']}