🐛 Fix founder cannot end their own call
This commit is contained in:
parent
e15cd25c81
commit
1867ff64f7
@ -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")
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,7 @@ func NewCall(channel models.Channel, founder models.ChannelMember) (models.Call,
|
||||
id := fmt.Sprintf("%s+%d", channel.Alias, channel.ID)
|
||||
call := models.Call{
|
||||
ExternalID: id,
|
||||
FounderID: founder.AccountID,
|
||||
FounderID: founder.ID,
|
||||
ChannelID: channel.ID,
|
||||
Founder: founder,
|
||||
Channel: channel,
|
||||
|
Loading…
Reference in New Issue
Block a user