Fix Slack Link Parsing (#589)

This commit is contained in:
Yuhong Sun 2023-10-18 11:14:12 -07:00 committed by GitHub
parent 5bf998219e
commit 022f59e5b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -200,6 +200,9 @@ class SlackTextCleaner:
# Find user IDs in the message
possible_link_matches = re.findall(r"<(.*?)>", message)
for possible_link in possible_link_matches:
if not possible_link:
continue
# Special slack patterns that aren't for links
if possible_link[0] not in ["#", "@", "!"]:
link_display = (
possible_link