Rooms: expose the Telegram chat kind (channel vs group) in disco#info #10

Open
opened 2026-11-04 03:33:06 +00:00 by asxpi · 2 comments
Member

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:

  • 1:1 contacts: user answers disco#info as client/pc, bot as client/bot, and presence caps follow the identity (component/gateway.tcl peerInfo, component/bots.tcl). Nothing is needed here.
  • Rooms: group, supergroup, forum, channel and gigagroup all answer conference/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:

  • an XEP-0128 data form on the room's disco#info, for example a field tg#kind = group|supergroup|forum|channel|gigagroup (or a short channel boolean);
  • a feature var per kind (for example urn:…:tackygram:channel);
  • the standard MUC features: muc_moderated with 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.

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:** - **1:1 contacts:** `user` answers disco#info as `client/pc`, `bot` as `client/bot`, and presence caps follow the identity (`component/gateway.tcl` `peerInfo`, `component/bots.tcl`). Nothing is needed here. - **Rooms:** `group`, `supergroup`, `forum`, `channel` and `gigagroup` all answer `conference/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: - an XEP-0128 data form on the room's disco#info, for example a field `tg#kind` = `group|supergroup|forum|channel|gigagroup` (or a short `channel` boolean); - a feature var per kind (for example `urn:…:tackygram:channel`); - the standard MUC features: `muc_moderated` with 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.
Owner

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 field kind is one of group | supergroup | forum | channel | gigagroup and is always present. Its field admin is 0 or 1. When Telegram provides them, the form also carries username, members, slowmode and can_view_participants, and muc#roominfo gets one more field, urn:tacky:room:1#online. Channels and gigagroups also carry muc_moderated, but only kind tells 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 answer client/bot and people answer client/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 whose kind is channel gets channel set on its chat row, and the flag is kept across restarts. The tag filter gains the keys channel and bot, so the app 0.8.0-beta5 can offer Channels, Groups, Bots and People folders.

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 field `kind` is one of `group | supergroup | forum | channel | gigagroup` and is always present. Its field `admin` is 0 or 1. When Telegram provides them, the form also carries `username`, `members`, `slowmode` and `can_view_participants`, and muc#roominfo gets one more field, `urn:tacky:room:1#online`. Channels and gigagroups also carry `muc_moderated`, but only `kind` tells 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 answer `client/bot` and people answer `client/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 whose `kind` is `channel` gets `channel` set on its chat row, and the flag is kept across restarts. The tag filter gains the keys `channel` and `bot`, so the app 0.8.0-beta5 can offer Channels, Groups, Bots and People folders.
Owner

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.

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.
Sign in to join this conversation.
No labels
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/tackygram#10
No description provided.