- Go 91.9%
- Dockerfile 8.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Closes #9 Monitoring plan, phase 5 rollout, same as the pilots argus/backend#45 and argus/frontend#35. ## Changes (`.forgejo/workflows/ci.yml`) - New step "Collect publish details for Argus": `/tmp/dependencies.txt` = the direct requirements of `go.mod`. For the devel snapshot only, `ARGUS_ARTIFACT` = the plugin bundle `name|bytes|generic package page`; a numbered release already attaches the bundle as an asset, and publish-release reports that. - Both publish-release calls (numbered release, devel snapshot) get `ARGUS_UPLOAD_TOKEN: ${{ secrets.ARGUS_UPLOAD_TOKEN }}` and `${ARGUS_ARTIFACT:+--artifact "$ARGUS_ARTIFACT"} --dependencies /tmp/dependencies.txt`. A failed upload only warns, the release itself is unaffected. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014BSmBtGWeFBD9z4mYm9SjA Reviewed-on: #10 |
||
| .forgejo/workflows | ||
| server | ||
| .gitignore | ||
| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| plugin.json | ||
| README.md | ||
| renovate.json | ||
ivatar Avatar Sync
A Mattermost plugin that syncs profile pictures from a self-hosted Libravatar-compatible avatar server (such as ivatar) on login.
No existing Mattermost plugin or core feature does this - mattermost/mattermost#885 has been open since 2015 with no implementation - so this was written from scratch.
How it works
On every successful login (password or SSO), the plugin:
- Computes the Gravatar/Libravatar identifier for the user's email (MD5 of the lowercased, trimmed address).
- Fetches
<IvatarBaseURL>/<hash>?s=512&d=404from the configured avatar server. A404means the user has no avatar registered there, and the plugin leaves their existing Mattermost picture untouched. - If found, uploads the image via
SetProfileImage, skipping the upload entirely if it's identical to what was set last time (tracked in the plugin's KV store), so a normal login doesn't re-upload on every request.
Installation
- Download
ivatar-avatar-sync-<version>.tar.gzfrom the latest release (also in the repo's generic package registry,ivatar-avatar-sync, alongside the<version>-devsnapshot ofmain). - In Mattermost: System Console → Plugin Management → Upload Plugin,
select the downloaded
.tar.gz, then enable it. - Configure it under System Console → Plugins → ivatar Avatar Sync:
- ivatar avatar base URL: the base
/avatar/endpoint of your Libravatar-compatible server, e.g.https://avatar.example.com/avatar/. Required - the plugin does nothing until this is set. - Enable avatar sync: on/off switch.
- ivatar avatar base URL: the base
Development
go test ./...
go vet ./...
CI runs both on every push to main and on pull requests, same
snapshot/release split as the other repos on this instance
(.forgejo/workflows/ci.yml):
- every push to
mainpublishes the bundle as the mutable<version>-devgeneric package (<version>fromplugin.json) and refreshes the rollingdeveldraft release, whose notes preview the next release; - a numbered release is a manual run of the workflow with a
versioninput: it publishes that version, tagsv<version>and creates the release, bundle attached, notes generated from the PRs, issues and commits since the previous tag. Bumpplugin.json'sversionby hand afterwards, to plan the next one.
Caveat
The plugin sets the profile picture directly via the server API
(UserHasLoggedIn → SetProfileImage), bypassing Mattermost's built-in MFA
check - it's a post-login notification hook, not part of the auth flow
itself, so this doesn't weaken login security, but be aware it doesn't go
through the same code path as a manual picture upload.
License
GPLv3 or later.