aboutsummaryrefslogtreecommitdiffstats
path: root/src/nip29-client.js
Commit message (Collapse)AuthorAgeFilesLines
* Relay groups with nothing said wait at the bottom of Messages, and a dead ↵Adam Soltys30 hours1-2/+7
| | | | | | | relay says so. "They shouldn't be at the top if they have 0 members and no recent activity" (Adam, 2026-11-12), of four groups.0xchat.com groups that came in on his kind 10009 list (saved by Armada) and topped the phone's list. A group's place was its last message, else the moment this device first recorded it, so a list adoption counted as brand new. Now a relay group without messages sorts by when it was joined on this device (joinedAt, set by Join) and one that only arrived on the list sorts last. groups.0xchat.com no longer resolves: a group whose relay can't be reached and that has shown nothing reads "<host> isn't answering" on its row ("On <host>" while it is still quiet) instead of "0 members"; the mark clears with the relay's first event and on every start. nip29-group-test joins gone.invalid'deadgroup on the second device and reads the row Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6UKGJyuGyZFxddYRxS
* A relay group joined on one device shows up on the others. "Not seeing the ↵Adam Soltys30 hours1-5/+36
| | | | | | | pyramid runners chat I joined and messaged in on my laptop appear on my phone" (Adam, 2026-11-12). The joined groups live in the kind 10009 list, but it was read once, when Messages started (a phone open in the background since before the join never looked again), and written only to the four home relays and the user's own, of which relay.coinos.io refused kind 10009 (allowed since, desk write-policy) and nos.lol and damus kept nothing: the laptop's list sat on primal and ditto alone, beside a stale copy on purplepag.es. Now the list is followed live (a limit-1 subscription on the home relays; a newer copy is adopted and its groups join the list here), read again whenever Messages resubscribes after an absence (at most every 30 s), always read deep (home, index and own relays) before a write, and published to all of those, so the newest copy is where any device looks. Groups dropped from the list elsewhere are still kept here. nip29-group-test: the same twelve words open a second browser, which follows the list live and shows the group once the laptop's signed list arrives on that subscription Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6UKGJyuGyZFxddYRxS
* Messages joins NIP-29 relay groups: New group → Relay group → paste an ↵Adam Soltys2 days1-0/+325
address → Join. "can i join pyramid runners from coinos v3? … add it" (Adam, 2026-11-11), for fiatjaf's pyramid.fiatjaf.com'Tnq7x2ZTgrPZWFrC. A NIP-29 group lives on one relay, which keeps its members and signs its metadata (39000 name/about/picture, 39001 admins, 39002 members); messages are plain signed events with an h tag. src/nip29-client.js speaks it behind the same interface as the White Noise and Cordn clients, so the group screens drive all three (g.nip29; gClient/gOn/findGroup/wnGroups learn it): live kind 9/7/5 (and 9000/9001/9021/9022) on the group's relay with NIP-42 AUTH where the relay asks (never an interactive signer unasked), metadata read only from the group's own relay, replies sent as NIP-C7 q tags (shown through an added e), NIP-29 previous tags from the relay's recent events, reactions and own-message delete as before. Join sends kind 9021 and holds the group either way (an open group reads before the relay's yes; a refusal is said in a toast); leave sends 9022. Addresses: host'id, wss://host'id, an naddr of the 39000, or a client's link (chachi.chat/<host>/<id>, flotilla's /spaces/<host>/<id>). The joined groups are the NIP-51 kind 10009 other clients keep: read at start (groups joined elsewhere appear here), written back on join and leave after reading the newest copy (deep on a first write, like the mute list), and a group left this session can't be brought back by a list read still in flight. Messages and metadata kept per identity in the marmot IndexedDB store (|nip29, last 200 per group; wiped with the wallet). The member panel says it isn't encrypted, shows about, and copies the address. No attachments, no creating groups or admin actions yet. tools/nip29-group-test.js reads the real group (relays: 'read'; join, list, message and leave publishes answered in place) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6UKGJyuGyZFxddYRxS