mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2026-02-05 14:56:29 -06:00
Update fetchStatusMessage to handle empty offset / page
This commit is contained in:
@@ -656,6 +656,14 @@ export class ChannelStartupService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async fetchStatusMessage(query: any) {
|
public async fetchStatusMessage(query: any) {
|
||||||
|
if (!query?.offset) {
|
||||||
|
query.offset = 50;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!query?.page) {
|
||||||
|
query.page = 1;
|
||||||
|
}
|
||||||
|
|
||||||
return await this.prismaRepository.messageUpdate.findMany({
|
return await this.prismaRepository.messageUpdate.findMany({
|
||||||
where: {
|
where: {
|
||||||
instanceId: this.instanceId,
|
instanceId: this.instanceId,
|
||||||
|
|||||||
Reference in New Issue
Block a user