Update : turns out
Enum.GetNames(typeof(NotificationMessage.Code))[notification.Code]
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}",
Enum.GetNames(typeof(NotificationMessage.Code))[notification.Code],
notification.Content,
notification.Subject,
notification.Id,
notification.SenderId,
notification.CreateTime);
}
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
}