Wolox / react-chat-widget

Awesome chat widget for your React App
MIT License
1.47k stars 458 forks source link

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

Open ArthurVerstraete opened 4 years ago

ArthurVerstraete commented 4 years ago

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 commented 4 years ago

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.

amiel-danao commented 1 year ago

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?