Skip to content

onlyworlds 0.67.0

Choose a tag to compare

@github-actions github-actions released this 26 Oct 18:05
· 326 commits to main since this release
  • Behaviour change for unread_for on wire data: pass the members list. unread_for(messages, character_id, read_mark, members=None) gains members, the world's members list as GET members returns it. A message that carries created_by (read from the API) is now the reader's own, and so left out of its unread list, only when its sender is verified: its author's Character, looked up on members, is the reader's and so is its narrator. A message whose narrator names the reader but whose author plays another Character, is not on the list or plays none, is unread for the reader; a claim never marks a message read for the Character it names. Without a members list nothing on the wire is proved, so a caller that passes no members now sees its own sent messages as unread: pass members to keep them out. A message with no created_by key (a folder, an export) has no hand to check, and its narrator is trusted as before. This is decided message by message.
  • read_mark_of counts a mark only when every write on it was its reader's own hand. Besides the author check, a mark that carries changed_by (the API's last writer, None for the owner as created_by is) counts only when changed_by equals created_by, so a mark the owner or another member changed since it was made is ignored and the reader's own older mark, if any, stands. A mark with changed_by but no created_by does not count; one with neither (a folder, an export) still does; one with created_by and no changed_by is held to the author check alone.
  • The three edge rulings, as the readers already answered them, now in their docstrings: a message with no narrator is sent by nobody; an empty id ("") is addressed by no message, not even one to everyone, and has no read mark; a thread's walk up parent_narrative ends at a parent that is not a string id. The newest mark by updated_at wins wherever it stands in the list, as since 0.65.0.
  • Schema repinned to schema-dist v0.33.0-dist.75 (from dist.74; same canonical 00.33.00, so SCHEMA_VERSION stays "00.33.00", no schema file moved). Serial 75 rewrites the message profile's unread and read mark rules as above and its fixture holds 55 cases (from 43), all replayed by the tests; the other changes are text (the calendar page and two of its fixture's case notes, the import map's opening and source, the names page's readers). SCHEMA_DIST_TAG, SCHEMA_DIST_SERIAL and SCHEMA_MANIFEST_SHA256 name the new pin.
  • Tests: two for what the fixture does not settle: a mark's changed_by (absent, None beside a member's created_by, None on both for the owner, present with no created_by, a newer mark another hand changed beside the reader's own older one), and unread_for with no members list, an empty one, a member row with no Character, the owner's hand, a message written under another's name, and a list that mixes messages with and without created_by.