Compare commits
No commits in common. "6af4576feda980c46f128a9f72c08596878565db" and "c1b905f49d9746b2347fadfa1b41d832182c733c" have entirely different histories.
6af4576fed
...
c1b905f49d
1 changed files with 1 additions and 6 deletions
|
|
@ -184,12 +184,7 @@ func (s *ChannelStore) GetParticipant(ctx context.Context, viewerUserID, channel
|
||||||
if errors.Is(err, domain.ErrChannelPrivate) {
|
if errors.Is(err, domain.ErrChannelPrivate) {
|
||||||
return domain.ChannelMember{}, domain.ErrUserNotParticipant
|
return domain.ChannelMember{}, domain.ErrUserNotParticipant
|
||||||
}
|
}
|
||||||
// A stale row for a former member (left/kicked) is not a current
|
if err == nil && participantUserID == viewerUserID && member.Status == domain.ChannelMemberLeft {
|
||||||
// participant for any caller, not just a self-check: channels.getParticipant
|
|
||||||
// on someone who has left must surface USER_NOT_PARTICIPANT like a missing
|
|
||||||
// row does, or callers get a "successful" ChannelParticipantLeft result for
|
|
||||||
// what protocol-wise is an absent participant.
|
|
||||||
if err == nil && member.Status != domain.ChannelMemberActive {
|
|
||||||
return domain.ChannelMember{}, domain.ErrUserNotParticipant
|
return domain.ChannelMember{}, domain.ErrUserNotParticipant
|
||||||
}
|
}
|
||||||
return member, err
|
return member, err
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue