Skip to content

Commit

Permalink
fix issue merging reactions
Browse files Browse the repository at this point in the history
  • Loading branch information
carderne committed Aug 19, 2024
1 parent 3111deb commit 70177e2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sigexport/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,12 @@ def to_message(self: MergeMessage) -> Message:
m_reactions = re.findall(p_reactions, body)
reactions = []
if m_reactions:
reactions = [Reaction(*r.split(":")) for r in m_reactions[0].split(", ")]
for r in m_reactions[0].split(", "):
reac = r.split(":")
if len(reac) < 2:
continue
name, emoji = reac
reactions.append(Reaction(name, emoji))
body = re.sub(p_reactions, "", body)

p_stickers = r"\n\(\( (.*) \)\)"
Expand Down

0 comments on commit 70177e2

Please sign in to comment.