Repository navigation
config,irckit: add per-bridge DisableAway option to ignore /AWAY - #1193
Merged
Merged
Conversation
Add DisableAway (default false) to BridgeConfig so individual bridges (such as Google Chat or Mastodon) can opt out of forwarding IRC /AWAY commands to SetStatus on the remote platform while still returning standard RPL_NOWAWAY / RPL_UNAWAY replies to the IRC client.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new DisableAway behavior lacks tests for both /AWAY forms, leaving backend updates and local state mutation vulnerable to regression.
1 open issue
What changed in this PR
Adds a hot-reloadable per-bridge DisableAway option that acknowledges IRC /AWAY commands without changing bridge or IRC away status.
Changes:
- Adds and loads
DisableAwayinBridgeConfig. - Bypasses away-state mutation and backend status updates when enabled.
| File | Description |
|---|---|
| mm-go-irckit/server_commands.go | Handles /AWAY acknowledgements without mutating away status when the option is enabled. |
| config/config.go | Defines and loads the per-bridge DisableAway configuration option. |
Review effort: Lite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Adds a per-bridge
DisableAwayboolean option (defaultfalse, hot-reloadable) toconfig.BridgeConfigso users can ignore IRC/AWAYcommands on specific bridges (e.g.[googlechat],[mastodon], or any future bridge) without affecting other bridges.Changes
config/config.go: AddsDisableAwaytoBridgeConfigand loads<section>.DisableAwayinbuildBridgeConfig.mm-go-irckit/server_commands.go(CmdAway): Whenu.br.BridgeConfig().DisableAwayis true, returns standardRPL_NOWAWAY/RPL_UNAWAYto the IRC client without callingu.br.SetStatusor mutatingu.away.Testing
make buildgolangci-lint run(0 issues)go test -mod=vendor ./...