Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
AdrianJF2's avatar
AdrianJF2
Honored Guest
3 years ago

ovrMessage_Notification_Room_InviteReceived can't get message user name to show on invite

Hi,

Calling the below line on receiving an invite (ovrMessage_Notification_Room_InviteReceived) returns a NULL user.

ovrUserHandle user = ovr_Message_GetUser(message);

 

I am trying to use the user to call:

const char* pDisplayName = ovr_User_GetDisplayName(user);

 

So with any invites that come in, I can display who sent them.

 

Is this a permissions thing, where you can't get the user for other players who aren't in your room yet?

If it is a permission, what permission would I need.

 

Thanks in advance.

 

 

 

 

1 Reply

  • ovrUserHandle user = ovr_Message_GetUser(message);

    I was wrong in thinking this could be used with any message.

    For my invite system I need to call ovr_User_Get and then only use my invite stored when I have found it's name. I guess flagging that's why I did the ovr_User_Get first. On receiving the user display name, adding this onto the invite then using it after that point. Be nicer if the invite just included a display name from it's sender by default.