Technically, we only need to unescape non-json message-tag *values*
This commit is contained in:
parent
0c6d54f5fd
commit
03cae696c1
1 changed files with 2 additions and 4 deletions
|
@ -97,12 +97,10 @@ def parse_line(line: str) -> IRCLine:
|
|||
tags_prefix = message_tag_unescape(tags_prefix)
|
||||
tags = json.loads(tags_prefix)
|
||||
else:
|
||||
tags_split = list(filter(None, tags_prefix.split(";")))
|
||||
tags_split = [message_tag_unescape(tag) for tag in tags_split]
|
||||
for tag in tags_split:
|
||||
for tag in filter(None, tags_prefix.split(";")):
|
||||
tag, sep, value = tag.partition("=")
|
||||
if sep:
|
||||
tags[tag] = value
|
||||
tags[tag] = message_tag_unescape(value)
|
||||
else:
|
||||
tags[tag] = None
|
||||
|
||||
|
|
Loading…
Reference in a new issue