Relationships#
A relationship between two users in the AcceleratXR platform is referred to internally as a Relationship.
Users can have any number of relationships to any number of other users. Each relationship describes the type
relationship between two users in addition to an optional alias and arbitrary data map. This makes it possible to
implement the following social network frameworks:
Followers
Friends
Blocked Users
Recently Met Users
The alias allows users to provide a custom name for the other user that is specific to them within their list. This
can be helpful in identifying the relationship among many other users with similar common names. Lastly, the data
property is also provided in order to give you the ability to implement additional capabilities that may be app
specific.
Encountering Users#
When players encounter one another while interacting in the product it is possible to create an ENCOUNTER user
relationship. This relationship is intended to track all players that a user may have recently met and desire to
see again in the future.
Following Users#
User relationships with the FOLLOW type describes relationships where a user is interested in being following
the activity of another user. This relationship is one-way in that the source user (userUid) wants to follow
the activity other user (otherUid). This makes it possible to create loosely coupled relationships between
users which can be beneficial when needing to create and maintain a set of one-way relationships for users such as subscribing to a
user’s feed.
Friending Users (FRIEND)#
A user relationship with the FRIEND type is the two-way relationship whereby two users independently have chosen
to follow the other. As this is a two-way relationship, requiring both users to participate, it is not possible to
simply create a user relationship with the FRIEND type.
Instead, any time two users create a FOLLOW
relationship to each other the system will automatically upgrade their relationship to a FRIEND type. Should
either side choose to delete their respective side of the relationship then the opposing relationship will be
downgraded down to a FOLLOW relationship.
For applications implementing a friends list system it is recommended that each user creates a FOLLOW
relationship to another and then sends a friend invite message to encourage the other user to create the needed
opposite relationship to complete the FRIEND relationship. This can be accomplished via the following steps.
Given user A wants to add user B as a friend:
User A creates a Relationship to user B with type
FOLLOW.User A sends message to user B containing an
inviteattachment to add them as a friend
1{
2 senderUid: <UserA_UUID>,
3 receiverUid: <UserB_UUID>,
4 subject: "UserA wants to be your friend!",
5 body: "UserA wants to be your friend.",
6 attachments: {
7 invite: "{ type: \"relationship\", userUid: <UserA_UUID> }"
8 }
9}
User B receives message containing friend invite sent by User A.
User B accepts friend invite. Creates a Relationship to user A with type
FOLLOWSystem automatically upgrades both connections to
FRIEND
Blocking Users#
Not everyone is going to want to be friends. In the event that a user wishes not to interact with another user they
can create a Relationship with the BLOCK type. This relationship is always a one-way relationship however it is
special in that the system will not allow a user to create an opposing FOLLOW relationship if an existing
BLOCK exists.
Similarly, if there exists a FOLLOW relationship between the two users then that relationship will be removed
once a BLOCK relationship is created. This is true even in the event that a FRIEND relationship exists.
In the event that a user attempts to follow a user that has blocked them an error is returned by the service.
It is the responsibility of the application to decide whether or not this error should be displayed to the user.