diff --git a/pkg/internal/server/api/calls_api.go b/pkg/internal/server/api/calls_api.go index 167477f..9c7bb7b 100644 --- a/pkg/internal/server/api/calls_api.go +++ b/pkg/internal/server/api/calls_api.go @@ -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") } diff --git a/pkg/internal/services/calls.go b/pkg/internal/services/calls.go index b0b2950..986b7e9 100644 --- a/pkg/internal/services/calls.go +++ b/pkg/internal/services/calls.go @@ -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,