RelationshipNotifications class
Relationship notifications provide callbacs to get instant update when your user status change.
You will not get any notifications from muted users.
public abstract class RelationshipNotifications
Usage
In order to receive notifications from server about some status changes, implement new class that will handle these events:
public class MyRelationshipNotifications : RelationshipNotifications
{
}
Then, you can override and implement specific events:
public class MyRelationshipNotifications : RelationshipNotifications
{
public override void UserLoggedIn (RelationshipResult notification)
{
Debug.Log($"User logged in: {notification.UserId}");
}
}
Methods
User Logged In
Get notification when your friend gets online.
UserLoggedIn(RelationshipResult notification);
User Logged Out
Get notification when your friend log out.
UserLoggedOut(RelationshipResult notification);
Friend Request Received
This callback will be triggered when you receive new friend request.
FriendRequestReceived(RelationshipResult notification);
Friend Request Sent
This callback will be triggered when you sent new friend request.
FriendRequestSent(RelationshipResult notification);
Friend Request Accepted
This callback will be triggered when you become friend with other user.
FriendRequestAccepted(RelationshipResult notification);
User Blocked
This callback will be triggered when you block other user.
UserBlocked(RelationshipResult notification);
Blocked By User
This callback will be triggered when other users block you.
BlockedByUser(RelationshipResult notification);
Unfriended
This callback will be triggered when you are no longer friend with other user.
Unfriended(RelationshipResult notification);
User Muted
This callback will be triggered when mute other user.
UserMuted(RelationshipResult notification);
Muted By User
This callback will be triggered other user mute you.
MutedByUser(RelationshipResult notification);
User Unmuted
This callback will be triggered other user mute you.
UserUnmuted(RelationshipResult notification);
Unmuted By User
This callback will be triggered other user unmute you.
UnmutedbyUser(RelationshipResult notification);