Live Helper Chat support forum.. Old google groups forum can be found here

You are not logged in.

Announcement

#1 2019-02-08 15:22:39

jersonjunior
Member
Registered: 2019-02-08
Posts: 5

Twilio SMS/Whatsapp - Close Chat

I recently made some simple modifications to the Twilio module to work with Whatsapp and I would like to know if it is possible to end the chat permanently. For every user interaction if Chat timeout is not reached, Livehelperchat reopens the chat.

Offline

#2 2019-02-08 15:49:28

PeopleInside
Administrator
From: Italy
Registered: 2014-04-10
Posts: 3,440
Website

Re: Twilio SMS/Whatsapp - Close Chat

Hi jersonjunior ,
welcome on the live helper chat forum!

About your question I need ask to the chat owner. I cannot grant a reply but i will try to.


lol PeopleInside - Live helper chat - free limited forum support!
wink For commercial support or GitHub [see FAQ here]
ops If you want to support this open source project, just donate [see support page]
glasses Something wrong with the forum? [contact a superhero]

Offline

#3 2019-02-08 15:56:21

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 2,686
Website

Re: Twilio SMS/Whatsapp - Close Chat

Hi,

At the moment there is no setting for that. But you can make small modification there

https://github.com/LiveHelperChat/twili … p.php#L469

Something like

[== Undefined ==]

if (($chat = $tChat->chat) !== false) && $chat instanceof erLhcoreClassModelChat && $chat->status == erLhcoreClassModelChat::STATUS_CLOSED_CHAT) {
$tChat->removeThis();
$tChat = null;
}

Offline

#4 2019-02-08 16:29:05

jersonjunior
Member
Registered: 2019-02-08
Posts: 5

Re: Twilio SMS/Whatsapp - Close Chat

Hi, It worked with this code but if the client sends another message for example after 5 minutes the LHC does not receive more messages from that client! I had to remove the chat there and open another chat!

Offline

#5 2019-02-08 16:37:21

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 2,686
Website

Re: Twilio SMS/Whatsapp - Close Chat

Well default logic is just always if chat is closed. Make it pending again if i receive new messages. Fb extension has something similar what you want. Perhaps it would help
https://github.com/LiveHelperChat/fbmes … tstrap.php

Offline

#6 2019-02-08 17:37:52

jersonjunior
Member
Registered: 2019-02-08
Posts: 5

Re: Twilio SMS/Whatsapp - Close Chat

I'll take a look at the code, there is some possibility of updating the Twilio module for Whatsapp, I left in github the modifications I made.

Offline

#7 2019-08-26 17:32:24

jersonjunior
Member
Registered: 2019-02-08
Posts: 5

Re: Twilio SMS/Whatsapp - Close Chat

Hi remdex

Close Twilio SMS and Whatsapp chat when operator close chat.

In #https://github.com/LiveHelperChat/twilio/blob/master/bootstrap/bootstrap.php comment lines below:

Lines: 470, 471 and 493

  `//if ($tChat !== false && ($chat = $tChat->chat) !== false ) {
  //$renotify = false;
  // fix LiveHelperChat/fbmessenger#1
  if ($chat instanceof erLhcoreClassModelChat && $chat->status == erLhcoreClassModelChat::STATUS_CLOSED_CHAT) {
  $chat->status = erLhcoreClassModelChat::STATUS_PENDING_CHAT;
  $chat->status_sub_sub = 2; // Will be used to indicate that we have to show notification for this chat if it appears on list
  $chat->user_id = 0;
  $chat->pnd_time = time();
  $renotify = true;
  //}`

Offline

Board footer