@@ -310,6 +310,12 @@ class C2CTags final
310310 && tagvalue.find_first_of (" \n\r " ) != std::string::npos;
311311 }
312312
313+ static bool ValidateReaction (LocalUser* user, const std::string& tagvalue)
314+ {
315+ return !tagvalue.empty ()
316+ && tagvalue.length () <= 50 ;
317+ }
318+
313319 static bool ValidateTyping (LocalUser* user, const std::string& tagvalue)
314320 {
315321 // A typing notification is represented by a TAGMSG command sent with a
@@ -324,9 +330,9 @@ class C2CTags final
324330 AllowTags allowclientonlytags;
325331 insp::flat_map<std::string, std::function<bool (LocalUser*, const std::string&)>, irc::insensitive_swo> knowntags = {
326332 { " +draft/channel-context" , ValidateChannel }, // https://ircv3.net/specs/client-tags/channel-context
327- { " +draft/react" , ValidateMessageId }, // https://ircv3.net/specs/client-tags/react
333+ { " +draft/react" , ValidateReaction }, // https://ircv3.net/specs/client-tags/react
328334 { " +draft/reply" , ValidateMessageId }, // https://ircv3.net/specs/client-tags/reply
329- { " +draft/unreact" , ValidateMessageId }, // https://ircv3.net/specs/client-tags/react
335+ { " +draft/unreact" , ValidateReaction }, // https://ircv3.net/specs/client-tags/react
330336
331337 { " +reply" , ValidateMessageId }, // https://ircv3.net/specs/client-tags/reply
332338 { " +typing" , ValidateTyping }, // https://ircv3.net/specs/client-tags/typing
0 commit comments