You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like I was able to make the whole setup via docket toolbox for mac.
I created my own config.js file and set up facebook app. After logging in in two browsers, I can see each other in the chat.Once I click the other person the chat window is opened and I see the "create" request in devtools network tab.
However the newly created data added to the ChatController.ChatroomChannel.objects['new'] are never send back via websockets. In dev tools the websocket only receive 2probe, 3probe, device bind data and ready flag. The I see only numbers 2 and 3 received occasionally.
I wonder whether it is due to wrong schema setup or something different. I dont see any errors except the ones which in browser console telling me "Cannot read property 'objects' of undefined" here on chat_ctrl.js
on('focus', function() { //when putting the input in focus we send the seen flag unless the last message already has it var message = ChatController.MessagesChannel.objects[ChatController.lastHisMessageId]; if (message && !message.seen) ChatController.MessagesChannel.objects[ChatController.lastHisMessageId].seen = true; });
but it is because I never got the websocket custom data back.
I guess the issue can be with my schema.json which I needed to modify to work at all.. (the one shown in tutorial is not wrapped to "schema" and does not have appId). Here is my schema:
Looks like I was able to make the whole setup via docket toolbox for mac.
I created my own config.js file and set up facebook app. After logging in in two browsers, I can see each other in the chat.Once I click the other person the chat window is opened and I see the "create" request in devtools network tab.
However the newly created data added to the ChatController.ChatroomChannel.objects['new'] are never send back via websockets. In dev tools the websocket only receive 2probe, 3probe, device bind data and ready flag. The I see only numbers 2 and 3 received occasionally.
I wonder whether it is due to wrong schema setup or something different. I dont see any errors except the ones which in browser console telling me "Cannot read property 'objects' of undefined" here on chat_ctrl.js
on('focus', function() { //when putting the input in focus we send the seen flag unless the last message already has it var message = ChatController.MessagesChannel.objects[ChatController.lastHisMessageId]; if (message && !message.seen) ChatController.MessagesChannel.objects[ChatController.lastHisMessageId].seen = true; });
but it is because I never got the websocket custom data back.
I guess the issue can be with my schema.json which I needed to modify to work at all.. (the one shown in tutorial is not wrapped to "schema" and does not have appId). Here is my schema:
{ "appId": "9bc4221c-168e-4f11-b997-499d700dca16", "schema": { "chatroom":{ "meta_read_acl":6, "properties":{ "participant_1":{ "type":"user" }, "participant_2":{ "type":"user" }, "recipient_is_typing":{ "type":"bool" }, "sender_is_typing":{ "type":"bool" } }, "read_acl":6, "write_acl":6 }, "message":{ "belongsTo":[{ "parentModel":"chatroom" }], "meta_read_acl":6, "properties":{ "received":{ "type":"bool" }, "recipient_id":{ "type":"user" }, "seen":{ "type":"bool" }, "text":{ "type":"string"} }, "read_acl":6, "write_acl":6 }, "task":{ "meta_read_acl":6, "properties":{ "completed":{ "type":"bool" }, "recipient_id":{ "type":"user" }, "text":{ "type":"string" } }, "read_acl":6, "write_acl":6 } } }
Any help highly appreciated.
Thanks for awesome work
The text was updated successfully, but these errors were encountered: