Closed Horki closed 4 years ago
There should be a merge
function so you can take a pre-parsed message and modify its existed tags with a new set of tags.
This is what I came up with, but there are various edge cases I haven't bothered to handle. I've been exceedingly busy lately: https://github.com/museun/still_shaken/blob/master/crates/still_shaken/src/bot/test.rs#L264-L318
I think the one provided in this crate should operate directly on Tags/TagsIndices
though.
I ended up rewriting it using some of your design.
I had to do some reworking to support escaping and unescaping.
I apologize for all of my rewrites of your contributions. This crate is structured weirdly (with a lot of hidden 'magic') that makes it non-trivial (or obvious, to be honest) on how to do things.
Your contributions are motivating me, though. This 'feature' would've stayed unimplemented forever because I would just do it locally for whatever I use this crate for.
As for your questions: I decided to implement it according to the IRCv3 spec:
I'm satisfied with the design. Merging this
@museun that's a lot of work in a short period :+1:
@museun hi, this is an initial version of Tag Builder, I created in a special namespace as a helper
TODO: