From 7dcf6caa0f9130fa33c9bd0f1f39d29b0ef59a08 Mon Sep 17 00:00:00 2001 From: Danyang Chen Date: Sun, 25 Oct 2026 13:21:22 +0800 Subject: [PATCH] Name both mixing functions in lineDigest's comment (#1077) The comment called the digest "two FNV-1a passes". Only the first pass is FNV-1a (prime 0x01000193); the second uses 0x85ebca6b plus a xor-shift, which is Murmur3's finalizer mix. Behaviour is right and the digest values do not change: the second pass only has to be a different mixing function, so this is a rename, not an algorithm fix. The #1062 changelog fragment never named FNV, so only the comment above lineDigest changes. Docs-not-needed: comment wording only, no documented behaviour changes (#1077) --- plugins/social/src/face-rooms.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/social/src/face-rooms.js b/plugins/social/src/face-rooms.js index 49c4ce63a..f2ca64743 100644 --- a/plugins/social/src/face-rooms.js +++ b/plugins/social/src/face-rooms.js @@ -686,8 +686,9 @@ export function faceEventKey(event) { if (!from && !text) return '' // The key names the line, but it never *is* the line: `seen` is persisted in the owner's settings, so on // a server that sends no ids it must not become a copy of the conversation (#1062). A bounded digest - // carries the body; the two FNV-1a passes are ours and stable across runs, with no time or counter in - // them — the same line handed back by a later poll has to key the same, or the duplicate comes back. + // carries the body: one FNV-1a pass (prime 0x01000193) and one Murmur3-style finalizer mix (constant + // 0x85ebca6b plus a xor-shift) — ours, and stable across runs, with no time or counter in them, so the + // same line handed back by a later poll keys the same or the duplicate comes back (#1077). return `unkeyed:${viewed.type}|${from}|${viewed.createdAt ?? ''}|${lineDigest(text)}` }