Document why there are more memberships than channels #428
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "mm-archived-memberships"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Answers the first question of #400 (why 458 memberships but 420 channels) from the Mattermost server source, at
mattermost/mattermost53211e45b,server/channels/store/sqlstore/channel_store.go:GET /users/me/channel_members(GetMembersForUserWithPagination) returns every membership. The only filter is on channel types that carry no messages, so archived channels and channels of a deleted team are included.GET /users/me/channels(GetChannelsByUser) addsChannels.DeleteAt = 0and "team not deleted" unlessinclude_deleted=true.api4/channel.go,getChannelsForUser) pages internally in steps of 100 and streams the whole list ("the client always needs to get the full data"). That is why it ignorespage/per_page, and why it is never truncated.So the 38 are archived channels or channels of a deleted team. Waggle already gives them no Postvak row: the listing iterates over channels, and the channel-window endpoint reads one as fully read (
_UNKNOWN_CHANNEL). That matches Mattermost, which hides archived channels by default. No code change is needed; this PR records the finding in CLAUDE.md's Mattermost gotchas and corrects the_UNKNOWN_CHANNELcomment.Not addressed, deliberately: the second half of #400, whether muted channels with unread messages should surface in Meelezen. That is a reading-model decision, not something to settle in a patch, so #400 stays open for it.
Docs and a comment only, so no CHANGELOG entry.
07067e147c949cf4f0dc949cf4f0dce8290504cbe8290504cb9c1ca9db9f