Package io.github.ma1uta.matrix.event
Class RoomMember
- java.lang.Object
-
- io.github.ma1uta.matrix.event.Event<C>
-
- io.github.ma1uta.matrix.event.RoomEvent<C>
-
- io.github.ma1uta.matrix.event.StateEvent<RoomMemberContent>
-
- io.github.ma1uta.matrix.event.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.
-
-
Constructor Summary
Constructors Constructor Description RoomMember()
-
Method Summary
-
Methods inherited from class io.github.ma1uta.matrix.event.StateEvent
getPrevContent, getStateKey, setPrevContent, setStateKey
-
Methods inherited from class io.github.ma1uta.matrix.event.RoomEvent
getEventId, getOriginServerTs, getRoomId, getSender, getUnsigned, setEventId, setOriginServerTs, setRoomId, setSender, setUnsigned
-
Methods inherited from class io.github.ma1uta.matrix.event.Event
getContent, setContent
-
-
-
-
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.
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
-
-
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 classEvent<RoomMemberContent>
- Returns:
- The type of the event.
-
-