[MM-56174] Account for archived channels in channel member for post permission check (#25837)

* [MM-56174] Account for archived channels in channel member for post permission check

* Add tests
Этот коммит содержится в:
Devin Binnie
2024-01-10 15:50:00 -05:00
коммит произвёл GitHub
родитель 1d108f0d9f
Коммит 43cca04f04
9 изменённых файлов: 129 добавлений и 21 удалений

Просмотреть файл

@@ -1727,11 +1727,11 @@ func (s *RetryLayerChannelStore) GetMemberCountsByGroup(ctx context.Context, cha
}
func (s *RetryLayerChannelStore) GetMemberForPost(postID string, userID string) (*model.ChannelMember, error) {
func (s *RetryLayerChannelStore) GetMemberForPost(postID string, userID string, includeArchivedChannels bool) (*model.ChannelMember, error) {
tries := 0
for {
result, err := s.ChannelStore.GetMemberForPost(postID, userID)
result, err := s.ChannelStore.GetMemberForPost(postID, userID, includeArchivedChannels)
if err == nil {
return result, nil
}