Only mesage-tag unescape non-json tags after we split on ";"
This commit is contained in:
parent
729d1424ed
commit
0c6d54f5fd
1 changed files with 4 additions and 2 deletions
|
@ -92,12 +92,14 @@ def parse_line(line: str) -> IRCLine:
|
|||
|
||||
if line[0] == "@":
|
||||
tags_prefix, line = line[1:].split(" ", 1)
|
||||
tags_prefix = message_tag_unescape(tags_prefix)
|
||||
|
||||
if tags_prefix[0] == "{":
|
||||
tags_prefix = message_tag_unescape(tags_prefix)
|
||||
tags = json.loads(tags_prefix)
|
||||
else:
|
||||
for tag in filter(None, tags_prefix.split(";")):
|
||||
tags_split = list(filter(None, tags_prefix.split(";")))
|
||||
tags_split = [message_tag_unescape(tag) for tag in tags_split]
|
||||
for tag in tags_split:
|
||||
tag, sep, value = tag.partition("=")
|
||||
if sep:
|
||||
tags[tag] = value
|
||||
|
|
Loading…
Reference in a new issue