Key calls by account and sid, not by sid alone #20

Closed
asxpi wants to merge 0 commits from asxpi/anotherim-js:fix/call-key-per-account into develop
First-time contributor

One of our accounts calling another that is signed in on the same app
gives both legs one sid: our outgoing call and the other account's
ring. Calls kept them in one record keyed by the sid, so the ring took
the place of our call. When another device took the ring, its Ended
(other_device) closed our call screen, and our hang-up went out as
calls hangup for the account that was not in the call, a no-op in the
backend. The peer was never told and kept the call up with its video
frozen.

Give each call a key: its sid, or account and sid when another of our
accounts already holds that sid. The store, the sheets and the sinks
know a call by the key, and the backend is still sent the call's own
acc and sid, so a call nobody else shares behaves as before.

A test in calls.test.ts plays the case through: the ring does not take
our call, and our hang-up names our account.

🤖 Generated with Claude Code

One of our accounts calling another that is signed in on the same app gives both legs one sid: our outgoing call and the other account's ring. Calls kept them in one record keyed by the sid, so the ring took the place of our call. When another device took the ring, its Ended (other_device) closed our call screen, and our hang-up went out as calls hangup for the account that was not in the call, a no-op in the backend. The peer was never told and kept the call up with its video frozen. Give each call a key: its sid, or account and sid when another of our accounts already holds that sid. The store, the sheets and the sinks know a call by the key, and the backend is still sent the call's own acc and sid, so a call nobody else shares behaves as before. A test in calls.test.ts plays the case through: the ring does not take our call, and our hang-up names our account. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
One of our accounts calling another that is signed in on the same app
gives both legs one sid: our outgoing call and the other account's
ring. Calls kept them in one record keyed by the sid, so the ring took
the place of our call. When another device took the ring, its Ended
(other_device) closed our call screen, and our hang-up went out as
calls hangup for the account that was not in the call, a no-op in the
backend. The peer was never told and kept the call up with its video
frozen.

Give each call a key: its sid, or account and sid when another of our
accounts already holds that sid. The store, the sheets and the sinks
know a call by the key, and the backend is still sent the call's own
acc and sid, so a call nobody else shares behaves as before.

A test in calls.test.ts plays the case through: the ring does not take
our call, and our hang-up names our account.

Assisted-by: Claude:opus-5-5
Owner

Merged by hand into develop (now at aa2fbcbf, on libtacky v1.0.0-rc10) for the 0.6.0 testing builds; thank you. One follow-up went in on top (c0a209eb): the camera action sent the call's key as the sid to the native engine on the leg with the composite key; it now sends call.sid, with a test. The Kotlin side still keys calls by sid alone (CallCoordinator.kt), noted for a later change. Closing, since a hand merge is not marked merged here.

Merged by hand into develop (now at aa2fbcbf, on libtacky v1.0.0-rc10) for the 0.6.0 testing builds; thank you. One follow-up went in on top (c0a209eb): the camera action sent the call's key as the sid to the native engine on the leg with the composite key; it now sends call.sid, with a test. The Kotlin side still keys calls by sid alone (CallCoordinator.kt), noted for a later change. Closing, since a hand merge is not marked merged here.
ann closed this pull request 2026-10-17 14:59:12 +00:00
ann referenced this pull request from a commit 2026-10-25 23:58:00 +00:00
A stranger's self-chosen name never stands alone (the user, 2026-10-26: "yes, show the address beside a stranger's name"): state/stranger-name.ts reads libtacky 1.1.3's ChatEntry.name_source and calls a name unvouched when it is `carried` (whatever the sender's message or subscribe said) or `pep` on someone with no roster item; the roster's own name and a roster contact's published nick stand alone as before (the user put that address in the roster themselves, and an address on every unnamed contact would be noise), rooms and PMs carry no source and are left alone (a room author's name has no source in libtacky's author <Changed> yet, audit #20). The address is the bare JID, "via Telegram" for a user behind a Telegram gateway (a numeric JID nobody reads; the transport is vouched by the roster, and the suffix still tells the stranger from the roster's contact of the same name), the Matrix ID for a Matrix gateway user (user%server@gw -> @user:server). Where it shows: the chat list row's title line, dim, after the name, middle-ellipsised (views/address-tag.ts: a head that ellipsises and an unshrinking tail, the address giving way first but never below its tail, the name keeping a few letters; one row height kept), and the row menu's subtitle; the chat header's line under the name, address first then the presence; the contact page, whole under the name with a hover saying why; notification titles "Mom (mallory@evil.example)", also with no row yet for the nick a 1:1 message carried, the Telegram secret chat nudge, the locked-time notice context and the push worker's mirrored names; the contacts-first gate's words; message search hits; the call screen under the caller's name; the call list. The request bar already showed the address, and the pickers' rows already carry the JID on their second line. Mock: Kadri Kask is a carried name, `mock stranger` takes { jid, name }, roster add/rename set name_source roster. i18n: "via {network}" and the contact page's hover in all six catalogues. Tests: stranger-name.test.ts (the rules, the address words, the split, the list row, the header, the contact page, notifications with and without a row, the notice context, the gate's words, search hits), call-views and calls-sheet cases; notifications, push and one-client expectations moved to the address now beside a nick no row vouches for. CHANGELOG Unreleased.
ann referenced this pull request from a commit 2026-10-27 13:09:52 +00:00
The remaining Lows of the final anotherim-js audit of 2026-10-27 (/data/another-im/audit-2026-10-27-final-anotherim-js.md): XEP-0439 actions are not drawn in rooms (#12: rowActions(m, room), message-row passes showNick, which both callers set from the chat's groupchat; libtacky refuses the press there and any occupant could draw buttons; whether action-selected goes out encrypted in an OMEMO chat is F2's libtacky half), a quick response chip shows the value it sends after its label whenever the two differ but for case and spacing (#13: XEP-0439 sends the value and only shows the label, so the new shownValue keeps the XEP and the reader sees the words before they go), isReportable is false for a room occupant's private chat since Blocking keeps bare JIDs and would block and report the whole room (#17, the safe one of the two choices), a vCard's tel: link carries data-ask and the link guard asks "Call {number}?" / "This opens {number} in your phone or calling app." before the opener in the shells and in a tab alike (#18), the desktop shell's openable hands a TEL: link on as tel: (#21, now a Cow), a gateway's auto-approved contact is added with no roster name instead of the subscribe nick (#19: their nick is their word, the name drawn then comes from their vCard or nick as theirs), and localHost, the page's sticker gate, also refuses a single-label host and names under .local, .localdomain, .home.arpa, .internal, .lan, .home, .intranet, .corp and .private, with the browser edition's remaining gap (a public-looking name resolving to a private address) documented at the function (#20). New strings in en, ru, uk, et and es; CHANGELOG Unreleased has a Security block naming the audit ids. Tests that failed before the fix (9 of them): quick-responses (rowActions in a room, shownValue, the chip showing "Large one Large"), report-spam (PM not reportable), requests (gateway contact added without a name), transfers (localHost local names), os-links (the tel question), links-cov (a data-ask tel opens through the question in a tab), vcard-profiles (tel link has data-ask); links.rs a_tel_scheme_in_upper_case_is_handed_on_in_lower_case. make -o audit check STRICT=1 clean (2110 keys), make test-ui 384 files 4246 passed 8 skipped, make test-shell ok, WebKit smoke 6769 ok with the contact info and profile card screens, its 4 FAILs the stale Android lock-line checks b1bdb10a fixed on develop.

Pull request closed

Sign in to join this conversation.
No description provided.