Skip to content

chat_set_identity() can set the account's picture - #27

Merged
TroyHernandez merged 2 commits into
mainfrom
identity-avatar
Oct 21, 2026
Merged

TroyHernandez merged 2 commits into
mainfrom
identity-avatar

Conversation

@TroyHernandez

Copy link
Copy Markdown
Contributor

chat_set_identity(client, display = NULL, avatar = NULL): avatar is a path to an image. Matrix uploads it and points the profile at it; Slack, Telegram and IRC have no API for a bot's picture, so they ignore it and answer FALSE when it was all that was asked for. chat_capabilities()$avatar says which adapters set it. Both arguments are optional now, and asking for nothing is FALSE.

Why: a consumer that sets its bot's picture at startup had to call mx.api::mx_upload() and mx_set_avatar_url() itself, which puts a Matrix dependency back into code that otherwise speaks only chat.api.

The testing seam .avatar on chat_matrix() stands for the upload-then-set pair.

Checks: 1520 tests pass; tinypkgr::check() 0 errors, 0 warnings, 0 notes.

`avatar` is a path to an image, alongside `display`. Matrix uploads it
and points the profile at it (testing seam `.avatar`); Slack, Telegram
and IRC have no API for a bot's picture, so they ignore it and answer
FALSE when it was all that was asked for. `chat_capabilities()$avatar`
says which adapters set it. Both arguments are optional now.
@TroyHernandez
TroyHernandez merged commit 8e0981c into main Oct 21, 2026
2 checks passed
@TroyHernandez
TroyHernandez deleted the identity-avatar branch October 21, 2026 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant