Skip to content

Commit 710cc08

Browse files
committed
fix(api-gql): correctly set bot status
1 parent dc525d5 commit 710cc08

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

apps/api-gql/internal/services/dashboard/dashboard.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -214,14 +214,15 @@ func (c *Service) GetBotStatus(ctx context.Context, channelID string) (entity.Bo
214214

215215
result := entity.BotStatus{
216216
Enabled: dbUser.Channel.IsEnabled,
217-
IsMod: true,
217+
IsMod: false,
218218
}
219219

220220
var errgrp errgroup.Group
221221

222222
errgrp.Go(
223223
func() error {
224224
if channelID == dbUser.Channel.BotID {
225+
result.IsMod = true
225226
return nil
226227
}
227228

@@ -239,7 +240,7 @@ func (c *Service) GetBotStatus(ctx context.Context, channelID string) (entity.Bo
239240
}
240241

241242
if len(mods.Data.Moderators) > 0 {
242-
result.IsMod = false
243+
result.IsMod = true
243244
}
244245

245246
return nil

0 commit comments

Comments
 (0)