🐛 Fix wrong perm check of channel member

This commit is contained in:
LittleSheep 2025-02-21 23:19:58 +08:00
parent fabda61822
commit 65cb542985

View File

@ -134,8 +134,7 @@ func removeChannelMember(c *fiber.Ctx) error {
var channel models.Channel
if err := database.C.Where(&models.Channel{
Alias: alias,
AccountID: user.ID,
Alias: alias,
}).First(&channel).Error; err != nil {
return fiber.NewError(fiber.StatusNotFound, err.Error())
} else if channel.Type == models.ChannelTypeDirect {