Class RoomMember


  • public class RoomMember
    extends StateEvent<RoomMemberContent>
    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

      • TYPE

        public static final String TYPE
        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.
        The following membership states are specified:
        • 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.
        • join - The user has joined the room (possibly after accepting an invite), and may participate in it.
        • leave - The user was once joined to the room, but has since left (possibly by choice, or possibly by being kicked).
        • 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).
        • knock - This is a reserved word, which currently has no meaning.
        The third_party_invite property will be set if this invite is an invite event and is the successor of an m.room.third_party_invite event, and absent otherwise.
        This event may also include an invite_room_state key outside the content key. If present, this contains an array of StrippedState Events. These events provide information on a subset of state events such as the room name.
        See Also:
        Constant Field Values
    • Constructor Detail

      • RoomMember

        public RoomMember()
    • Method Detail

      • getType

        public String getType()
        Description copied from class: Event
        Required. The type of event. This SHOULD be namespaced similar to Java package naming conventions e.g. 'com.example.subdomain.event.type'.
        Specified by:
        getType in class Event<RoomMemberContent>
        Returns:
        The type of the event.