react-chat-widget icon indicating copy to clipboard operation
react-chat-widget copied to clipboard

Is it possible to not show the newMessage from the user in the chat-box?

Open ArthurVerstraete opened this issue 5 years ago • 2 comments

We are trying to display the messages from our API in the chat-box and we are using the inputfield too (the input posts the new message to our API), but it shouldn't be displayed directly in the chatbox. Is that possible? Or is it possible to use the 'deleteMessages' to delete the last message (without knowing the id)?

ArthurVerstraete avatar Apr 29 '20 15:04 ArthurVerstraete

Update: updated to v3.0.1 and deleteMessages does something, but not the right thing. It deletes all my old messages and displays the new message 2 times (1 time because of the default action done by the widget and once because of my API). Also, the launcher is gone. If I go into my console and type "document.getElementsByName("chat")[0].click()", the widget opens and if I then send a message, it does what I just explained + the launcher shows up.

FYI: this is how I implemented the use of my API image

EDIT Also all my other buttons are not working anymore.

ArthurVerstraete avatar May 04 '20 16:05 ArthurVerstraete

Update: updated to v3.0.1 and deleteMessages does something, but not the right thing. It deletes all my old messages and displays the new message 2 times (1 time because of the default action done by the widget and once because of my API). Also, the launcher is gone. If I go into my console and type "document.getElementsByName("chat")[0].click()", the widget opens and if I then send a message, it does what I just explained + the launcher shows up.

FYI: this is how I implemented the use of my API image

EDIT Also all my other buttons are not working anymore.

Do you have solution for this problem?

amiel-danao avatar Aug 06 '23 00:08 amiel-danao