diff --git a/pkg/internal/services/channel_members.go b/pkg/internal/services/channel_members.go index 7b835ed..9999833 100644 --- a/pkg/internal/services/channel_members.go +++ b/pkg/internal/services/channel_members.go @@ -72,7 +72,7 @@ func AddChannelMember(user authm.Account, target models.Channel) error { if err := database.C.Where(&models.ChannelMember{ AccountID: user.ID, ChannelID: target.ID, - }).First(&member).Error; err == nil || errors.Is(err, gorm.ErrRecordNotFound) { + }).First(&member).Error; err == nil || !errors.Is(err, gorm.ErrRecordNotFound) { return fmt.Errorf("the user is already in the channel") }