Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

channel deleteReaction is not working #1149

Open
anthonyroan opened this issue Jul 26, 2023 · 0 comments
Open

channel deleteReaction is not working #1149

anthonyroan opened this issue Jul 26, 2023 · 0 comments

Comments

@anthonyroan
Copy link

channel.deleteReaction(message_id, { type: 'love', }).then(result => { if (BF.community_current_topic && BF.community_current_topic.channel == channel_type) { viewEventTopic(BF.community_current_topic.id, BF.community_current_topic.channel, window.scrollY) } else { BF.getChannelMessages(displayMainMessages) } }, error => { console.log(error); }); } else { BF[channel_name].sendReaction(message_id, { type: 'love', }).then(result => { if (BF.community_current_topic && BF.community_current_topic.channel == channel_type) { viewEventTopic(BF.community_current_topic.id, BF.community_current_topic.channel, window.scrollY) } else { BF.getChannelMessages(displayMainMessages) } }, error => { console.log(error); });

Although sendReaction is working properly, deleteReaction is not working due to 400 error.

{ "response": { "data": "NativeXHR: Invalid url scheme '(null)'; only http and https are supported by NativeXHR", "status": 400, "statusText": "Bad Request", "headers": {}, "config": { "url": "https://chat-us-east-1.stream-io-api.com/messages/8e57104b-0f9a-468a-9693-bd49f7ecee3c/reaction/[object Object]", "method": "delete", "headers": { "Accept": "application/json, text/plain, */*", "Authorization": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiMTUxNDc4NSJ9.Qt0f4QGU6E2IMbb2d5F8jFZdwnhKX-0biArOD1_Zk5Q", "stream-auth-type": "jwt", "x-stream-client": "stream-chat-javascript-client-browser-2.6.0" }, "params": { "user_id": "1514785", "api_key": "6uqphnyems7b", "connection_id": "64b81419-0a05-16b1-0000-000000bdb88f" }, "transformRequest": [ null ], "transformResponse": [ null ], "timeout": 3000, "withCredentials": false, "xsrfCookieName": "XSRF-TOKEN", "xsrfHeaderName": "X-XSRF-TOKEN", "maxContentLength": -1, "maxBodyLength": -1, "warmUp": false }, "request": { "_context": { "delegate": null, "requestHeaders": { "accept": "application/json, text/plain, */*", "authorization": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiMTUxNDc4NSJ9.Qt0f4QGU6E2IMbb2d5F8jFZdwnhKX-0biArOD1_Zk5Q", "stream-auth-type": "jwt", "x-stream-client": "stream-chat-javascript-client-browser-2.6.0" }, "responseHeaders": {}, "listeners": {}, "readyState": 4, "responseType": "text", "withCredentials": false, "upload": { "_context": { "listeners": {} } }, "status": 400, "method": "DELETE", "url": "https://chat-us-east-1.stream-io-api.com/messages/8e57104b-0f9a-468a-9693-bd49f7ecee3c/reaction/[object Object]?user_id=1514785&api_key=6uqphnyems7b&connection_id=64b81419-0a05-16b1-0000-000000bdb88f", "async": true, "timeout": 3000, "statusText": "Bad Request", "responseText": "NativeXHR: Invalid url scheme '(null)'; only http and https are supported by NativeXHR" } } }, "status": 400 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant