Skip to content

Commit 70177e2

Browse files
committed
fix issue merging reactions
1 parent 3111deb commit 70177e2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

sigexport/models.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,12 @@ def to_message(self: MergeMessage) -> Message:
152152
m_reactions = re.findall(p_reactions, body)
153153
reactions = []
154154
if m_reactions:
155-
reactions = [Reaction(*r.split(":")) for r in m_reactions[0].split(", ")]
155+
for r in m_reactions[0].split(", "):
156+
reac = r.split(":")
157+
if len(reac) < 2:
158+
continue
159+
name, emoji = reac
160+
reactions.append(Reaction(name, emoji))
156161
body = re.sub(p_reactions, "", body)
157162

158163
p_stickers = r"\n\(\( (.*) \)\)"

0 commit comments

Comments
 (0)