🐛 Fix founder cannot end their own call

This commit is contained in:
2024-08-05 00:05:47 +08:00
parent e15cd25c81
commit 1867ff64f7
2 changed files with 2 additions and 2 deletions

View File

@ -129,7 +129,7 @@ func endCall(c *fiber.Ctx) error {
call, err := services.GetOngoingCall(channel)
if err != nil {
return fiber.NewError(fiber.StatusNotFound, err.Error())
} else if call.FounderID != user.ID && membership.PowerLevel < 50 {
} else if call.FounderID != membership.ID && membership.PowerLevel < 50 {
return fiber.NewError(fiber.StatusBadRequest, "only call founder or channel moderator can end this call")
}