fix: satisfy strict Buzz mention resolution

This commit is contained in:
Shakker
2026-08-02 06:03:42 +01:00
parent 0ee44d551a
commit c8d5d8ea34
+3
View File
@@ -235,6 +235,9 @@ export function resolveBuzzMessageMentions(params: {
);
}
const publicKey = matches[0];
if (!publicKey) {
throw new Error("Buzz mention resolution lost its unique room member");
}
if (publicKey !== senderPublicKey && !mentions.includes(publicKey)) {
if (mentions.length >= BUZZ_MENTION_MAX_COUNT) {
throw new Error(`Buzz messages support at most ${BUZZ_MENTION_MAX_COUNT} mentions`);