~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

Two reports in one millisecond get the same report `id`

Closed
Closed chadtmiller.com opened this issue 0 comments

What happened

createReport answers "id": now_millis(), not anything stored. Two reports made in the same millisecond (on the same subject or different ones, from anyone) are answered the same id; and no id can be looked up later, as the queue's events carry seq, never shown. No test checks id.

How to see it

Read against docs/fresh at 4636e6d, the code at: crates/group-host/src/moderation.rs:493, 506. Paths are under crates/group-host/src unless they say otherwise. Severity: low.

What you expected

Have Store::moderate return the event's seq (last_insert_rowid inside the transaction) and answer that as id.

Where

The host, as built from 4636e6d. Found while checking the docs against the code.