sendMessage - iOS Native app - canAccessRoom - Error
Hi there, I am trying to send a message through the native ios app that we re building using the objective ddp library.As I see I need to call the sendMessage method. When I do that I get from the callback the error:
Error: Error Domain=Meteor.Error Code=0 "[methods] canAccessRoom -> Cannot access empty room [invalid-room]" UserInfo={NSLocalizedDescription=[methods] canAccessRoom -> Cannot access empty room [invalid-room]}
I am connecting to the demo server and of course before trying to send the message I am logged in and I have joined the general room. Actually I can see my self logged in in the web app (I login using my facebook account on the web app and an other created account in the app).
Any suggestions?
@kormic can you confirm / link to the message object you're sending?
invalid-room error is thrown whenever canAccessRoom(rid, userId) is called with rid attribute containing a falsy value, and this value is gathered from the message object passed to sendMessage. Can you confirm which values are you calling this method with?
I think I found what I was doing wrong. I will get back to you once I m done with it... :)
@kormic I think based on you posting successfully that this is now resolved? :+1:
I am sorry for the delay!!! Yes this is resolved!!!