Skip to content

Commit

Permalink
Merge pull request EvolutionAPI#523 from gabrielgranado/main
Browse files Browse the repository at this point in the history
changed returned sessions on typebot status change
  • Loading branch information
DavidsonGomes authored Apr 9, 2024
2 parents 04575d8 + 9aba51c commit 73360d6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/whatsapp/services/typebot.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class TypebotService {

if (session) {
if (status === 'closed') {
findData.sessions.splice(findData.sessions.indexOf(session), 1);
const found_session : Session[] = findData.sessions.splice(findData.sessions.indexOf(session), 1);

const typebotData = {
enabled: findData.enabled,
Expand All @@ -68,7 +68,7 @@ export class TypebotService {
delay_message: findData.delay_message,
unknown_message: findData.unknown_message,
listening_from_me: findData.listening_from_me,
sessions: findData.sessions,
sessions: found_session,
};

this.create(instance, typebotData);
Expand Down Expand Up @@ -106,7 +106,7 @@ export class TypebotService {
delay_message: findData.delay_message,
unknown_message: findData.unknown_message,
listening_from_me: findData.listening_from_me,
sessions: findData.sessions,
sessions: findData.sessions.splice(findData.sessions.indexOf(session), 1),
};

this.create(instance, typebotData);
Expand Down

0 comments on commit 73360d6

Please sign in to comment.