• Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Darkly)
  • No Skin
Collapse
brainCloud Forums
K

Kirlos Yousef

@Kirlos Yousef
About
Posts
5
Topics
2
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

    getMessagesPage with $or field not working probably
  • K Kirlos Yousef

    Hello,

    I have been trying to call getMessagesPage with $or field, to get the messages sent to/from the specified profile ID. (to have a small one-to-one chat.)

    Instead, I am receiving all the messages of the current user, no matter who was the sender or receiver.

    In short: calling the API with $or, having the same response as calling it without searchCriteria at all.

    Request:

    {
        "context": {
            "searchCriteria": {
                "$or": [
                    { "message.from": "184d9950-180b-4da4-a362-f9d4a2418b81" },
                    { "message.to": "184d9950-180b-4da4-a362-f9d4a2418b81" }
                ]
            }
        }
    }
    

    In the following response, I receive three messages, when only the last one follows the rule:

    {
        "data": {
            "results": {
                "count": 3,
                "page": 1,
                "items": [
                    {
                        "message": {
                            "from": {
                                "id": "e81e35db-c349-4cee-8851-32e29538b11e",
                                "name": "Tester 1"
                            },
                            "sentAt": 1666125294637,
                            "to": [
                                "14869a2a-631b-4ea9-b241-b06a57e729f4"
                            ],
                            "content": {
                                "text": "Chat and messaging features are here!"
                            }
                        },
                        "msgbox": "inbox"
                    },
                    {
                        "message": {
                            "from": {
                                "id": "14869a2a-631b-4ea9-b241-b06a57e729f4",
                                "name": "Tester 2"
                            },
                            "sentAt": 1666125957202,
                            "to": [
                                "e81e35db-c349-4cee-8851-32e29538b11e"
                            ],
                            "content": {
                                "text": "Chat and messaging features are here!"
                            }
                        },
                        "msgbox": "sent"
                    },
                    {
                        "message": {
                            "from": {
                                "id": "14869a2a-631b-4ea9-b241-b06a57e729f4",
                                "name": "Tester 2"
                            },
                            "sentAt": 1666179911502,
                            "to": [
                                "184d9950-180b-4da4-a362-f9d4a2418b81"
                            ],
                            "content": {
                                "text": "Chat and messaging features are here!"
                            }
                        },
                        "msgbox": "sent"
                    }
                ]
            }
        },
        "status": 200
    }
    

    So, am I doing something wrong here?

    Thank you very much.


  • lobbyId ?
  • K Kirlos Yousef

    Oh okay, I understand.
    Yeah I was already trying to use the C++ SDK, and I will also be waiting for the Obj-C one.

    Thank you!


  • lobbyId ?
  • K Kirlos Yousef

    Hi Paul,

    Thank you for your reply.
    The problem is that I am using the Objective-C SDK, and I don't have _bc.RTTService, it's also written "Coming soon!" in the API ref., so how can I register a handler in this case?

    Thank you!

    Kirlos.


  • lobbyId ?
  • K Kirlos Yousef

    Hello,

    Please I have a small question about the lobby, I have been working to implement it in my new app, but there is a required parameter for some functions which is lobbyId, I don’t know where can I get this from? As I don’t receive this id in the response when I create a new lobby.

    I searched on the portal tutorial, api ref and the forums, but didn’t find anything, so I think am lost here.

    Thank you.

  • Login

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users