Roster: say why a subscribe came pre-approved, so the app can tell an accepted invitation's auto-approval from a token's or a gateway's #22

Open
opened 2026-11-07 08:55:41 +00:00 by fmodf · 1 comment

Split from another-im/anotherim-swift#28 (reported by @asemeniv on 2026-11-06). The app's part, the confirmation's wording, is done there; this is the part that needs libtacky.

A notice when a subscribe was auto-approved: libtacky does not say why

After roster accept_invite, libtacky keeps an expectation for the inviter (roster.tcl :786 EXPECT_TTL 604800, Expect :838) and approves the inviter's reciprocal subscribe when it comes (OnSubscription :553-558, TakeExpected), emitting roster <Subscribe> -preauth 1. QA asked that the app tell the user when this happens ("Presence sharing with X was enabled automatically based on a previously accepted invitation").

The app cannot word that: -preauth 1 is also emitted when someone uses our invitation token (:559) and for XEP-0100 gateway users (TransportApprove, :597), so a notice on preauth would also fire for those.

Asked: say why a subscribe came pre-approved, e.g. <Subscribe> … -preauth 1 -reason expected|token|transport (or a separate event for a consumed expectation), documented in TackyWire. The app would then show the notice for expected only, once the subscription is both ways.

> Split from another-im/anotherim-swift#28 (reported by @asemeniv on 2026-11-06). The app's part, the confirmation's wording, is done there; this is the part that needs libtacky. ## A notice when a subscribe was auto-approved: libtacky does not say why After `roster accept_invite`, libtacky keeps an expectation for the inviter (`roster.tcl` :786 `EXPECT_TTL 604800`, `Expect` :838) and approves the inviter's reciprocal subscribe when it comes (`OnSubscription` :553-558, `TakeExpected`), emitting `roster <Subscribe> -preauth 1`. QA asked that the app tell the user when this happens ("Presence sharing with X was enabled automatically based on a previously accepted invitation"). The app cannot word that: `-preauth 1` is also emitted when someone uses *our* invitation token (:559) and for XEP-0100 gateway users (`TransportApprove`, :597), so a notice on `preauth` would also fire for those. **Asked:** say why a subscribe came pre-approved, e.g. `<Subscribe> … -preauth 1 -reason expected|token|transport` (or a separate event for a consumed expectation), documented in TackyWire. The app would then show the notice for `expected` only, once the subscription is both ways.
Owner

Added in libtacky v1.2.1 (https://dev.another.im/another-im/libtacky/releases/tag/v1.2.1): roster <Subscribe> now carries a -reason of expected, token or transport ("" when it is a plain preauthorized subscribe with no cause), so the app can tell an accepted invitation's auto-approval apart from a token's or a gateway's. It is documented in the TackyWire schema.

Please check with v1.2.1 or newer.

Added in libtacky v1.2.1 (https://dev.another.im/another-im/libtacky/releases/tag/v1.2.1): roster `<Subscribe>` now carries a `-reason` of `expected`, `token` or `transport` ("" when it is a plain preauthorized subscribe with no cause), so the app can tell an accepted invitation's auto-approval apart from a token's or a gateway's. It is documented in the TackyWire schema. Please check with v1.2.1 or newer.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
another-im/libtacky#22
No description provided.