@onlyworlds/sdk 4.89.0 → 4.89.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/index.d.ts +0 -11
- package/dist/index.js +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@ earlier history lives in git log only.
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [4.89.1] - 2026-10-27
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **`noteOf` reads the hidden mark as every other reader in the package does**: any `hidden` but absent, null or false leaves a Note out (it read only `true`), so a doubt is left out, as the review and world-file readers already decide. The shared edge case moves with it, in both packages.
|
|
13
|
+
|
|
8
14
|
## [4.89.0] - 2026-10-27
|
|
9
15
|
|
|
10
16
|
### Added
|
package/dist/index.d.ts
CHANGED
|
@@ -4791,17 +4791,6 @@ declare function unreadFor<T extends object>(messages: readonly T[], characterId
|
|
|
4791
4791
|
* `parent_narrative` like any other (a reply to a Note that answers the root is in the thread).
|
|
4792
4792
|
*/
|
|
4793
4793
|
declare function threadOf<T extends object>(messages: readonly T[], rootId: string): T[];
|
|
4794
|
-
/**
|
|
4795
|
-
* The Character's line: the id of the Character's newest own-hand Note among the given
|
|
4796
|
-
* Narratives, or null when it has none (always null for an empty id). A Note (`isNote`) counts
|
|
4797
|
-
* when its `narrator` is the Character, it is in its author's hand (no `created_by` key, a folder:
|
|
4798
|
-
* the narrator is trusted; with `created_by`, the wire: `senderStatus` against `members` is
|
|
4799
|
-
* `verified`, so a mismatch or an unverifiable Note is nobody's), it is not hidden
|
|
4800
|
-
* (`hidden: true`) and not proposed (`x_review_proposed` an object, the review profile), and its
|
|
4801
|
-
* id is a string. Of those, the newest by `created_at` (the last in `created_at` order among those
|
|
4802
|
-
* whose time can be read; equal times: the later in the list), or the last in the list when none
|
|
4803
|
-
* can be read. A Note is never a message: it is never unread and in no thread.
|
|
4804
|
-
*/
|
|
4805
4794
|
declare function noteOf(narratives: readonly object[], characterId: string, members: Members): string | null;
|
|
4806
4795
|
|
|
4807
4796
|
/**
|
package/dist/index.js
CHANGED
|
@@ -3925,6 +3925,7 @@ function threadOf(messages, rootId) {
|
|
|
3925
3925
|
};
|
|
3926
3926
|
return inCreatedOrder(messages.filter((m) => isBody(m) && !isNote(m) && reaches(m)));
|
|
3927
3927
|
}
|
|
3928
|
+
var isHiddenMark = (value) => value !== void 0 && value !== null && value !== false;
|
|
3928
3929
|
function noteOf(narratives, characterId, members) {
|
|
3929
3930
|
if (!Array.isArray(narratives) || typeof characterId !== "string" || characterId === "") return null;
|
|
3930
3931
|
let line = null;
|
|
@@ -3934,7 +3935,7 @@ function noteOf(narratives, characterId, members) {
|
|
|
3934
3935
|
const note = el;
|
|
3935
3936
|
const id = idOf(note);
|
|
3936
3937
|
if (typeof id !== "string" || id === "" || note.narrator !== characterId) continue;
|
|
3937
|
-
if (note.hidden
|
|
3938
|
+
if (isHiddenMark(note.hidden) || proposedMarkOf(note) !== null || !isOwnHand(note, characterId, members)) continue;
|
|
3938
3939
|
const key = timeKey(note.created_at);
|
|
3939
3940
|
if (line === null || (key !== null ? lineKey === null || compareKeys(key, lineKey) >= 0 : lineKey === null)) {
|
|
3940
3941
|
line = id;
|