Repository navigation
handleslack: don't make archived channels read-only before the archive notice - #202
Draft
indent[bot] wants to merge 2 commits into
Draft
indent[bot] wants to merge 2 commits into
indent[bot] wants to merge 2 commits into
Conversation
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.
Logs
Failed to send message part to Matrixwithsubtype=channel_archiveandM_FORBIDDEN: user has insufficient power level(events_default=100,required_power_level=100). This happened 14 times in the last 24h (6 accounts) and 5 times the day before (5 accounts). From Nov 27 to Nov 30 it hit 27 times: 17 accounts, 24 channels, 6 clusters. The first failure came right after archived channels started being made read-only. Loki window checked: 2026-11-30 05:45-06:00 UTC, plus 5 more accounts around their archive events.Cause
Slack sends
channel_updatedbefore thechannel_archivemessage. TheChannelUpdateEventresync fetches the channel info, seesis_archivedand setsevents_defaultto 100. The "archived the channel" notice is then rejected and dropped. The archive message's ownPostHandleFuncwas supposed to apply read-only after the notice is bridged.Change
Resyncs triggered by
channel_updatedno longer make a room read-only: when the fetched channel is archived,events_defaultand the topic power level are left unchanged, and read-only is applied after the archive notice by itsPostHandleFunc. Unarchiving still lifts read-only through thechannel_updatedresync, and the unarchive notice'sPreHandleFuncalso lifts it before the notice is bridged. The startup full sync still applies the archived state; catch-up resyncs don't update chat info.Before / after
Note: not tested against a live account.
Caveats: on head the topic level also stays unchanged until the archive notice, so a lost notice leaves the room writable until the next restart. Channels already archived at startup are read-only on both.
Tag
@indentto continue the conversation here.