Class RoomMemberContent
- java.lang.Object
-
- io.github.ma1uta.matrix.event.content.RoomMemberContent
-
- All Implemented Interfaces:
EventContent
public class RoomMemberContent extends Object implements EventContent
Adjusts the membership state for a user in a room. It is preferable to use the membership APIs (/rooms/<room id>/invite etc) when performing membership actions rather than adjusting the state directly as there are a restricted set of valid transformations. For example, user A cannot force user B to join a room, and trying to force this state change directly will fail.
-
-
Field Summary
Fields Modifier and Type Field Description private String
avatarUrl
The avatar URL for this user, if any.static String
BAN
The user has been banned from the room, and is no longer allowed to join it until they are un-banned from the room (by having their membership state set to a value other than ban).private String
displayName
The display name for this user, if any.static String
INVITE
The user has been invited to join a room, but has not yet joined it.private Boolean
isDirect
Flag indicating if the room containing this event was created with the intention of being a direct chat.static String
JOIN
The user has joined the room (possibly after accepting an invite), and may participate in it.static String
KNOCK
This is a reserved word, which currently has no meaning.static String
LEAVE
The user was once joined to the room, but has since left (possibly by choice, or possibly by being kicked).private String
membership
Required.private Invite
thirdPartyInvite
Third-party invites.private Unsigned
unsigned
Contains optional extra information about the event.
-
Constructor Summary
Constructors Constructor Description RoomMemberContent()
-
Method Summary
Modifier and Type Method Description String
getAvatarUrl()
Boolean
getDirect()
String
getDisplayName()
String
getMembership()
Invite
getThirdPartyInvite()
Unsigned
getUnsigned()
void
setAvatarUrl(String avatarUrl)
void
setDirect(Boolean direct)
void
setDisplayName(String displayName)
void
setMembership(String membership)
void
setThirdPartyInvite(Invite thirdPartyInvite)
void
setUnsigned(Unsigned unsigned)
-
-
-
Field Detail
-
INVITE
public static final String INVITE
The user has been invited to join a room, but has not yet joined it. They may not participate in the room until they join.- See Also:
- Constant Field Values
-
JOIN
public static final String JOIN
The user has joined the room (possibly after accepting an invite), and may participate in it.- See Also:
- Constant Field Values
-
LEAVE
public static final String LEAVE
The user was once joined to the room, but has since left (possibly by choice, or possibly by being kicked).- See Also:
- Constant Field Values
-
BAN
public static final String BAN
The user has been banned from the room, and is no longer allowed to join it until they are un-banned from the room (by having their membership state set to a value other than ban).- See Also:
- Constant Field Values
-
KNOCK
public static final String KNOCK
This is a reserved word, which currently has no meaning.- See Also:
- Constant Field Values
-
avatarUrl
private String avatarUrl
The avatar URL for this user, if any. This is added by the homeserver.
-
displayName
private String displayName
The display name for this user, if any. This is added by the homeserver.
-
membership
private String membership
Required. The membership state of the user. One of: ["invite", "join", "knock", "leave", "ban"].
-
isDirect
private Boolean isDirect
Flag indicating if the room containing this event was created with the intention of being a direct chat. See Direct Messaging.
-
thirdPartyInvite
private Invite thirdPartyInvite
Third-party invites.
-
unsigned
private Unsigned unsigned
Contains optional extra information about the event.
-
-
Method Detail
-
getAvatarUrl
public String getAvatarUrl()
-
setAvatarUrl
public void setAvatarUrl(String avatarUrl)
-
getDisplayName
public String getDisplayName()
-
setDisplayName
public void setDisplayName(String displayName)
-
getMembership
public String getMembership()
-
setMembership
public void setMembership(String membership)
-
getDirect
public Boolean getDirect()
-
setDirect
public void setDirect(Boolean direct)
-
getThirdPartyInvite
public Invite getThirdPartyInvite()
-
setThirdPartyInvite
public void setThirdPartyInvite(Invite thirdPartyInvite)
-
getUnsigned
public Unsigned getUnsigned()
-
setUnsigned
public void setUnsigned(Unsigned unsigned)
-
-