Skip to content

feat: hint that a contact is a bot in the chat banner

Nicoco requested to merge nicoco/gajim:bot-icon into master

I think it would be good to display the disco info "identity client/bot" somewhere in gajim's UI. I attempted it in the chat banner, where the "last message has been sent from a phone" icon is.

Screenshot_20231005_133204

For contacts where the bot identity is attached to a resource (which is the most common case for bots, components are quite rare), it requires a gajim update to actually use the disco info. This is because I don't fully understand the logic flow between disco and caps events in gajim. It seems similar to the transport icon update issues I have in the other MR. fixed by !985 (ed8b22fa)

To get the icon to respect the dark/light theme, the SVG wasn't good enough, despite breaking it into simple paths with inkscape. I guess it does not comply to what's described in GTK docs, which points to the Symbolic Icons Specification (broken link unfortunately). Or maybe we're missing an attribute or element in the .ui file. Any, by generating PNGs with gtk-encode-symbolic-svg, it seems to work. Generating PNGs from SVGs is a good idea anyway, since displaying a bitmap is theoretically faster than rendering vector graphics. From its man page:

GTK+ can load and recolor these pngs, just like original svgs, but loading them is much faster.

Edited by Nicoco

Merge request reports