pass decoded username to db query when looking for mentions
This commit is contained in:
parent
819e1cdbc1
commit
cef8cb0bbf
1 changed files with 4 additions and 1 deletions
|
@ -360,7 +360,10 @@ height=\"32\" src=\"{emote_}\" data-mx-emoticon />""",
|
|||
message = message.replace(f":{emote}:", emote_)
|
||||
|
||||
for mention in set(mentions):
|
||||
username = self.db.fetch_user(mention).get("username")
|
||||
# Unquote just in-case we matched an encoded username.
|
||||
username = self.db.fetch_user(urllib.parse.unquote(mention)).get(
|
||||
"username"
|
||||
)
|
||||
if username:
|
||||
match = re.search(self.id_regex, mention)
|
||||
|
||||
|
|
Loading…
Reference in a new issue