Tags: a Private folder still shows bots; no People, Bots or Channels filter #84
Labels
No labels
android
bug
duplicate
feature request
linux
macos
needsinfo
severity: high
severity: low
severity: medium
telegram_gw
ui/ux
windows
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
another-im/anotherim-js#84
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 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'stags.tclMatchesonly knowchatandmuc, 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 withclient/pc, and the contact's presence carries the matching XEP-0115 caps (oneverper 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:
client/botcontact, not only Telegram.bot: true|false, in bothtagMatchesand libtacky'stags.tcl(docs/protocol/tags-0.md), kept in step as the file's comment requires.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).
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 carriesbotandchannelflags, and tags take matchingbotandchannelfilter 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 theurn:tacky:room:1form with kindchannel. 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.