chatengine-io / react-chat-engine

React component for a cheap and easy chat API
138 stars 35 forks source link

Cannot delete direct chat. #49

Closed Sergey1888888 closed 3 years ago

Sergey1888888 commented 3 years ago

If you use direct messages, then the name of the chat does not exist and when deleting writes to enter "null". To fix this you need to put the name of the chat in the chat list. bug

alamorre commented 3 years ago

Luckily for you I fixed this! Rolling the update now.

You type null and it will work - just refresh the website 😀

BiStokeCity commented 3 years ago

I get error 404 when connect socket to url "wss://api.chatengine.io/person/?publicKey={{project_id}}&username={{user_name}}&secret={{user_secret}}". Can you help me plss :(

Sergey1888888 commented 3 years ago

I get error 404 when connect socket to url "wss://api.chatengine.io/person/?publicKey={{project_id}}&username={{user_name}}&secret={{user_secret}}". Can you help me plss :(

Check that everything is correct as here: https://rest.chatengine.io/#connect-to-web-socket

BiStokeCity commented 3 years ago

Yes, i am following that docs and i always get err 404

Vào 22:40, Th 4, 28 thg 4, 2021 Sergei @.***> đã viết:

I get error 404 when connect socket to url "wss:// api.chatengine.io/person/?publicKey={{project_id}}&username={{user_name}}&secret={{user_secret}} http://api.chatengine.io/person/?publicKey=%7B%7Bproject_id%7D%7D&username=%7B%7Buser_name%7D%7D&secret=%7B%7Buser_secret%7D%7D". Can you help me plss :(

Check that everything is correct as here: https://rest.chatengine.io/#connect-to-web-socket

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/alamorre/react-chat-engine/issues/49#issuecomment-828559448, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFG2TWZ4G5ZB77VROAAZXYLTLAUABANCNFSM43XCDLCQ .

Sergey1888888 commented 3 years ago

Yes, i am following that docs and i always get err 404 Vào 22:40, Th 4, 28 thg 4, 2021 Sergei @.***> đã viết: … I get error 404 when connect socket to url "wss:// api.chatengine.io/person/?publicKey={{project_id}}&username={{user_name}}&secret={{user_secret}} http://api.chatengine.io/person/?publicKey=%7B%7Bproject_id%7D%7D&username=%7B%7Buser_name%7D%7D&secret=%7B%7Buser_secret%7D%7D". Can you help me plss :( Check that everything is correct as here: https://rest.chatengine.io/#connect-to-web-socket — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#49 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFG2TWZ4G5ZB77VROAAZXYLTLAUABANCNFSM43XCDLCQ .

Take a look at this code for more understanding: https://github.com/alamorre/react-chat-engine/blob/master/src/components/Socket/index.js If you're sending invalid data to the server, expect 400 errors. I hope you have created a project and in place of {{project-id}}, {{user_name}} and {{user_secret}} inserted your data from the previously created project? If so, did you check on the code from the example:

let socket = new WebSocket(
    "wss://api.chatengine.io/person/?publicKey={{project_id}}&username={{user_name}}&secret={{user_secret}}"
);
socket.onopen = (event) => console.log(event);
socket.onclose = (event) => console.log(event);
socket.onmessage = (event) => console.log(event);
socket.onerror = (error) => console.log(error);