Rooms: expose the Telegram chat kind (channel vs group) in disco#info #10
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?
anotherim-js wants folders by chat type: People, Bots, Groups, Channels (another-im/anotherim-js#84). Bots are already distinguishable on the XMPP side, but channels aren't.
What the gateway exposes now:
useranswers disco#info asclient/pc,botasclient/bot, and presence caps follow the identity (component/gateway.tclpeerInfo,component/bots.tcl). Nothing is needed here.group,supergroup,forum,channelandgigagroupall answerconference/text(component/muc.tcl). A client can't tell a broadcast channel from a group without joining it and reading its roles.Proposal: mark the Telegram kind on the room's disco#info so a client can filter by it without joining. Options:
tg#kind=group|supergroup|forum|channel|gigagroup(or a shortchannelboolean);urn:…:tackygram:channel);muc_moderatedwith occupants as visitors, which comes close for channels but doesn't separate them from moderated groups.Whatever form it takes should be documented in
docs/so that the client and libtacky's tag filter can rely on it.The gateway has exposed this since v0.4.0-beta1 (the release that brought groups, channels, gigagroups and forums in as rooms), but it was never documented. Every room's disco#info carries a second XEP-0128 form, FORM_TYPE
urn:tacky:room:1. Its fieldkindis one ofgroup | supergroup | forum | channel | gigagroupand is always present. Its fieldadminis 0 or 1. When Telegram provides them, the form also carriesusername,members,slowmodeandcan_view_participants, and muc#roominfo gets one more field,urn:tacky:room:1#online. Channels and gigagroups also carrymuc_moderated, but onlykindtells a channel from a muted group. The new docs/rooms.md, shipped in 0.4.0-beta4, documents every field with an example. It also covers the 1:1 side: bots answerclient/botand people answerclient/pc, and the caps in the contact's presence name exactly that answer. The gateway code needed no change. libtacky 1.2.0-beta5 reads the form. A room whosekindischannelgetschannelset on its chat row, and the flag is kept across restarts. The tag filter gains the keyschannelandbot, so the app 0.8.0-beta5 can offer Channels, Groups, Bots and People folders.The flood of channel alerts that came up here is addressed in tackygram 0.4.0-rc1: a broadcast channel's new bookmark now starts on mentions (XEP-0492
on-mention) instead of every post, so an account in many channels no longer alerts every client on every post at the link and at each catch-up. A basic group alone still starts on every message.Bookmarks already written keep their setting. For a channel that is still loud, mute it in the app, or set its bookmark to on-mention.