Skip to content

Commit e469dc1

Browse files
Merge pull request #1536 from Daquisu/fix-fetchStatusMessage-params
Update `fetchStatusMessage` to handle empty offset / page
2 parents a53e0a8 + fa14aba commit e469dc1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/api/services/channel.service.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,14 @@ export class ChannelStartupService {
677677
}
678678

679679
public async fetchStatusMessage(query: any) {
680+
if (!query?.offset) {
681+
query.offset = 50;
682+
}
683+
684+
if (!query?.page) {
685+
query.page = 1;
686+
}
687+
680688
return await this.prismaRepository.messageUpdate.findMany({
681689
where: {
682690
instanceId: this.instanceId,

0 commit comments

Comments
 (0)