Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions
You are not logged in.
Pages: 1
hello, i have been looking at the API swagger documentation.
For the chat
/restapi/chat
Creates a new chat
it is possible to pass user_id to specify system message.
However, I would like to add a system message to an already existing chat.
I looked at addmsgadmin
/restapi/addmsgadmin
Add message to chat as an admin
The only parameters for this API are chat_id, msg, sender, meta_msg and operator_name.
How do I add system message to existing chat? Thanks
Offline
Hi,
I just pushed this update https://github.com/LiveHelperChat/liveh … f0fa835e0e if you set sender as 'system' message will appear as a system message. Swagger still not updated to reflect this.
Offline
Thanks for the quick update. Will update and try it out!
Offline
UPDATE: Sorry, please ignore this. I had a problem when updating and the filepath for the modules was wrong. It works, thank you for the fix!!
Hi! Sorry but I am having trouble. After updating, I cannot see the changes.
This is a picture of my postman API call and response
And this is my code that shows there is the update from yesterday's update
Testing was done after following the update instructions. To be sure, I also disabled and re-enabled caching, and clean cache in settings.
I am not sure if there is something else I can do. I have tried manually overwriting all $messageUserId at the end, but API call does not reflect this change.
if ($form->sender == 'system') {
$messageUserId = -1;
} else if ($form->sender != 'bot') {
$messageUserId = $userData->id;
} else {
$messageUserId = -2;
}
$messageUserId = -1;
Last edited by shrnt (2021-02-25 11:52:49)
Offline
Pages: 1