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
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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:786EXPECT_TTL 604800,Expect:838) and approves the inviter's reciprocal subscribe when it comes (OnSubscription:553-558,TakeExpected), emittingroster <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 1is also emitted when someone uses our invitation token (:559) and for XEP-0100 gateway users (TransportApprove, :597), so a notice onpreauthwould 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 forexpectedonly, once the subscription is both ways.Added in libtacky v1.2.1 (https://dev.another.im/another-im/libtacky/releases/tag/v1.2.1): roster
<Subscribe>now carries a-reasonofexpected,tokenortransport("" 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.