Compare commits

..

No commits in common. "97711c9d2e4847fa0d45c0fbb89f98fedc4423ff" and "fde4db01faa70b08010462d1d761214302377102" have entirely different histories.

2 changed files with 0 additions and 12 deletions

View file

@ -347,11 +347,6 @@ func (s *ChannelStore) EditChannelAdmin(_ context.Context, req domain.EditChanne
member.InviterUserID = req.UserID
member.Status = domain.ChannelMemberActive
member.LeftAt = 0
// See the postgres EditChannelAdmin implementation for why this is
// needed: a kicked/banned member carries BannedRights.ViewMessages=true,
// and editAdmin unconditionally reactivates them to Active, so any
// lingering ban must be lifted too.
member.BannedRights = domain.ChannelBannedRights{}
if previous.Status != domain.ChannelMemberActive {
if minPts := channelInitialAvailableMinPts(channel); minPts > member.AvailableMinPts {
member.AvailableMinPts = minPts

View file

@ -100,13 +100,6 @@ func (s *ChannelStore) EditChannelAdmin(ctx context.Context, req domain.EditChan
member.InviterUserID = req.UserID
member.Status = domain.ChannelMemberActive
member.LeftAt = 0
// A kicked/banned member carries BannedRights.ViewMessages=true (see
// EditChannelBanned above); editAdmin unconditionally reactivates them
// to Active, so any lingering ban must be lifted too -- otherwise the
// contradictory Active+ViewMessages-banned state trips later checks
// (e.g. TransferChannelOwnership's participant check) that never
// expect an active member to be ban-restricted from viewing messages.
member.BannedRights = domain.ChannelBannedRights{}
if req.HasRank() {
member.Rank = req.Rank
}