Class 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 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
      • 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.
    • Constructor Detail

      • RoomMemberContent

        public RoomMemberContent()
    • 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)