How did in-app notification of direct chat invitation work?

After some testing, I’ve found out that only users that never direct-chat with the current account user before can send this in-app notification.
According to doc :

A user will receive an in-app notification when a request to chat has been received.

Is this intended?

The server sends an in-app notification when a user tries to DM chat with you. As far as we’re aware that function currently works as intended.

Can you clarify what the behaviour you see is, and what you expected instead?

Behaviour on our demo: user A DM user B for the very first time: user B can receive a notification.
But if both users leave the chat channel and then either one of the users trying to DM the other again. No notification received.
The behaviour we expecting will be: After both users leaving the channel, DM notification should be received by the invited user when one of the users trying to DM the others.

If both users leave the DM channel, then the notification is sent again the next time one of them rejoins it. Are you trying to send further messages after you leave the channel but before you join it again? Or after both users have joined again?

Also make sure you’re running Nakama 2.6.0 before you run your tests.

Update : turns out


thorws array out of bounds exception sliently. Now it’s working fine.

We’ve upgraded to Nakama 2.6.0 and still can’t receive DM invitation.
Here are some infomation:
server get this log when the user A start DM to user B:

{"level":"debug","ts":"2019-08-09T01:10:14.240-0400","msg":"Sending *rtapi.Envelope_Channel message","uid":"335cef7f-d6ac-4620-b0c0-ff488aa9273e","sid":"82027258-de36-4522-a9e6-37effd6bf99b","envelope":"cid:\"2\" channel:<id:\"4.335cef7f-d6ac-4620-b0c0-ff488aa9273e.e63f7182-005c-4299-b678-94b36276a23d.\" self:<user_id:\"335cef7f-d6ac-4620-b0c0-ff488aa9273e\" session_id:\"82027258-de36-4522-a9e6-37effd6bf99b\" username:\"800\" persistence:true > > "}

In our code we have :

            ConversationSocket.ReceivedNotification += (notification) => {
                Debug.LogFormat("Notification [{0}] : {1}, {2}, {3},{4},{5}",

But nothing comes up in Unity debug console.

If we use this to list all notification we can see it has persistent record for the user B :

    "id": "f5d5d1ab-e145-4f2d-85cf-fbc9d3cbf16f",
    "subject": "800 wants to chat",
    "content": "{\"username\": \"800\"}",
    "code": -1,
    "sender_id": "335cef7f-d6ac-4620-b0c0-ff488aa9273e",
    "create_time": "2019-08-09T05:08:48Z",
    "persistent": true