Tags: a Private folder still shows bots; no People, Bots or Channels filter #84

Open
opened 2026-11-04 03:33:01 +00:00 by asxpi · 1 comment
Member

A tag (folder) set to show only Private chats still lists Telegram bots. There is no way to make a "People" or "Bots" folder, and no way to tell channels from groups.

Seen on: 0.8.0-beta3 (Flatpak), Telegram through tackygram.

Cause: "Private" is the filter kind: "chat" (ui/src/views/tag-editor-sheet.ts). tagMatches (ui/src/state/tag-filter.ts) and libtacky's tags.tcl Matches only know chat and muc, so every 1:1 contact matches, bots included.

The gateway already tells bots apart: tackygram answers disco#info for a bot with the identity client/bot, and for a person with client/pc, and the contact's presence carries the matching XEP-0115 caps (one ver per identity). The client only asks disco lazily, for the composer's / commands (ui/src/state/bot-commands.ts); chat rows carry no bot flag.

Proposal:

  • Give a chat row a bot flag, learnt from the contact's caps (two hashes, each resolved once) or from disco#info. Ideally this is generic: any client/bot contact, not only Telegram.
  • Add a filter key for it, for example bot: true|false, in both tagMatches and libtacky's tags.tcl (docs/protocol/tags-0.md), kept in step as the file's comment requires.
  • In the tag editor, offer "People" (private without bots) and "Bots" next to Private and Groups.
  • Later: "Channels" as a kind of room, once the gateway marks channels (see the tackygram issue).

Limit: a bot whose presence or disco answer hasn't arrived yet (offline, just after a restart) can't be classified until it does.

Related: another-im/tackygram#10 (channels vs groups on the gateway side).

A tag (folder) set to show only **Private** chats still lists Telegram bots. There is no way to make a "People" or "Bots" folder, and no way to tell channels from groups. **Seen on:** 0.8.0-beta3 (Flatpak), Telegram through tackygram. **Cause:** "Private" is the filter `kind: "chat"` (`ui/src/views/tag-editor-sheet.ts`). `tagMatches` (`ui/src/state/tag-filter.ts`) and libtacky's `tags.tcl` `Matches` only know `chat` and `muc`, so every 1:1 contact matches, bots included. The gateway already tells bots apart: tackygram answers disco#info for a bot with the identity `client/bot`, and for a person with `client/pc`, and the contact's presence carries the matching XEP-0115 caps (one `ver` per identity). The client only asks disco lazily, for the composer's `/` commands (`ui/src/state/bot-commands.ts`); chat rows carry no bot flag. **Proposal:** - Give a chat row a bot flag, learnt from the contact's caps (two hashes, each resolved once) or from disco#info. Ideally this is generic: any `client/bot` contact, not only Telegram. - Add a filter key for it, for example `bot: true|false`, in both `tagMatches` and libtacky's `tags.tcl` (`docs/protocol/tags-0.md`), kept in step as the file's comment requires. - In the tag editor, offer "People" (private without bots) and "Bots" next to Private and Groups. - Later: "Channels" as a kind of room, once the gateway marks channels (see the tackygram issue). **Limit:** a bot whose presence or disco answer hasn't arrived yet (offline, just after a restart) can't be classified until it does. Related: another-im/tackygram#10 (channels vs groups on the gateway side).
ann referenced this issue from a commit 2026-11-04 13:52:56 +00:00
0.8.0-beta5, on libtacky v1.2.0-beta5 (d2df40f2), pairing with tackygram 0.4.0-beta4: develop as it stands on 83c17243, 0.8.0-beta4 with the chat list's touch gestures and its search's way out (lane U, 1f95d117: a chat row swiped to the left by touch closes the chat, a room asking first; the search's cross always there while the search is out; Android's back and Esc closing the search before the app), folders by chat kind (lane J, 2fa6de3c, #84: People, Groups, Channels and Bots in place of Private, the tag filter's bot and channel selectors) and the libtacky pin that learns those kinds (83c17243), made a beta: version 0.8.0-beta5 in the UI package and its lock, tauri.conf.json, Cargo.toml and Cargo.lock and the README's version line, Android versionCode 8004; a compact 0.8.0-beta5 CHANGELOG entry (Chats, Tags, Android); the metainfo's development release 0.8.0~beta5 (appstreamcli validate --no-net passes). docs/macos.md stays at the last Mac release. README's tables measured again on this tree: 109,749 lines of code and 113,536 of tests (the change since 0.8.0-beta4 counted by the same rules), the UI's 65,381 of 66,774 lines (97.9%, 90.7% of branches), the shell's 12,441 of 13,135 source lines (94.7%, emsdk's LLVM tools), the Kotlin's 4,412 of 4,678 (94.3%), the worker's 872 of 872. Gates on this tree: make check STRICT=1 clean (2,353 strings in all five catalogues, "Unmute" obsolete; check-macos clean); make test-ui 4,986 passed, 8 skipped (426 files); make test-shell 442 in 55 modules; make test-worker green; make release-check passed (10 allowed warnings, no advisory); the Android JVM tests free 621 and gms 624 passed; make coverage-shell-all 471 library tests and the glue; the WebKit smoke 865 screens, 8,921 checks, 0 failed with SMOKE_JOBS=16; cargo check of the shell for x86_64-pc-windows-gnu clean.
Owner

What was wrong: the tag editor's "Private" choice saved the filter kind: chat. The app's tagMatches and libtacky's tags.tcl only told 1:1 chats from rooms, so every 1:1 chat matched it, Telegram bots included. Nothing could tell a channel from a group either. What changed in the app: a chat row now carries bot and channel flags, and tags take matching bot and channel filter keys. In the tag editor, Show now offers All, People, Groups, Channels, Bots and Chosen in place of Private. People leaves the bots out, Bots holds only them, Groups leaves the broadcast channels out, and Channels holds only them. An existing "Private" tag opens as People and drops the bots once it is saved again. The tab counts follow the same filters. libtacky 1.2.0-beta5 supplies the flags: a contact whose disco identity is client/bot, on any server, and a room whose disco#info carries the urn:tacky:room:1 form with kind channel. tackygram 0.4.0-beta4 documents that channel mark. 0.8.0-beta5 carries it. One limit remains: a bot that has not yet been seen online once (no presence with caps and no disco answer yet) cannot be classified until it has been, and until then it shows under People.

What was wrong: the tag editor's "Private" choice saved the filter `kind: chat`. The app's tagMatches and libtacky's tags.tcl only told 1:1 chats from rooms, so every 1:1 chat matched it, Telegram bots included. Nothing could tell a channel from a group either. What changed in the app: a chat row now carries `bot` and `channel` flags, and tags take matching `bot` and `channel` filter keys. In the tag editor, Show now offers All, People, Groups, Channels, Bots and Chosen in place of Private. People leaves the bots out, Bots holds only them, Groups leaves the broadcast channels out, and Channels holds only them. An existing "Private" tag opens as People and drops the bots once it is saved again. The tab counts follow the same filters. libtacky 1.2.0-beta5 supplies the flags: a contact whose disco identity is client/bot, on any server, and a room whose disco#info carries the `urn:tacky:room:1` form with kind `channel`. tackygram 0.4.0-beta4 documents that channel mark. 0.8.0-beta5 carries it. One limit remains: a bot that has not yet been seen online once (no presence with caps and no disco answer yet) cannot be classified until it has been, and until then it shows under People.
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/anotherim-js#84
No description provided.