Linked account contacts never reach the roster #2
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?
Linked account's contacts never reach the roster
What happens
After linking a real Telegram account (QR,
updates runninglogged), theuser's roster gets only the gateway itself (
telegram.<domain>, both).None of the Telegram contacts appear, so there is nobody to write to without
knowing their numeric id.
Why
docs/DESIGN.md, Registration step 5: "Done: the gateway asks for a presencesubscription (XEP-0100), pushes the Telegram contacts into the roster
(XEP-0356, else XEP-0144), and says so", and the layout lists
roster.tcl XEP-0356 roster pushes, XEP-0144 fallback. There is nocomponent/roster.tcl, and nothing incomponent/sends a roster push. TheMilestones section puts "roster sync" in M1, so DESIGN.md contradicts
itself about what M0 delivers.
anotherim-server already grants the gateway what it needs: ejabberd logs
Granting permissions to external component 'telegram.<domain>': roster = both, presence = roster, message = outgoing.Expected
Either push the contacts on link (and on restart, as a diff) through
XEP-0356, or move step 5 to M1 in DESIGN.md so the M0 docs match the code.
Environment
feat/telegram-connectatcb68dd9, in anotherim-server's composedeployment (ejabberd 26.09).
Fixed in
58b32c7(main): the engine answerscontacts(contacts.getContacts, the users' access hashes kept, deleted accounts left out; docs/frames.md), and the newcomponent/roster.tclputs them in the user's roster when the account turns ready and on every component connect — XEP-0356 pushes with a diff against the roster (adds, renames, contacts gone from Telegram removed, one item per iq) where the server grants the roster privilege, an XEP-0144 roster item exchange otherwise.Two things worth knowing: ejabberd runs a privileged roster set as the user's own, so the items land with subscription
nonewhatever the push says; andmod_privilegewants an access rule name — with an ACL name ejabberd logs "Granting no permissions" and carries on (anotherim-server's ejabberd.yml already defines the access rule). DESIGN.md's step 5 and the milestones now say what M0 does.make e2eruns both modes (44/44 each); it needs libtacky ≥ v1.0.0-rc2 for the rig'sXMPP_COMPONENT_PRIVILEGEknob.