Top |
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 stripped state events. These events provide information on a few select state events such as the room name.
#define MATRIX_EVENT_TYPE_ROOM_MEMBER (matrix_event_room_member_get_type ())
The type for MatrixEventRoomMember.
MatrixRoomMembership
matrix_event_room_member_get_membership
(MatrixEventRoomMember *self
);
Get and return the current value of the "membership" property.
The membership state of the user.
void matrix_event_room_member_set_membership (MatrixEventRoomMember *self
,MatrixRoomMembership value
);
Set the value of the "membership" property to value
.
The membership state of the user.
self |
the MatrixEventRoomMember instance to modify |
|
value |
the new value of the "membership" property |
const gchar *
matrix_event_room_member_get_avatar_url
(MatrixEventRoomMember *self
);
Get and return the current value of the "avatar-url" property.
The avatar URL for this user, if any. This is added by the homeserver.
void matrix_event_room_member_set_avatar_url (MatrixEventRoomMember *self
,const gchar *value
);
Set the value of the "avatar-url" property to value
.
The avatar URL for this user, if any. This is added by the homeserver.
self |
the MatrixEventRoomMember instance to modify |
|
value |
the new value of the "avatar-url" property |
const gchar *
matrix_event_room_member_get_display_name
(MatrixEventRoomMember *self
);
Get and return the current value of the "display-name" property.
The display name for this user, if any. This is added by the homeserver.
void matrix_event_room_member_set_display_name (MatrixEventRoomMember *self
,const gchar *value
);
Set the value of the "display-name" property to value
.
The display name for this user, if any. This is added by the homeserver.
self |
the MatrixEventRoomMember instance to modify |
|
value |
the new value of the "display-name" property |
const gchar *
matrix_event_room_member_get_tpi_display_name
(MatrixEventRoomMember *self
);
Get and return the current value of the "tpi-display-name" property.
A name which can be displayed to represent the user instead of their third party identifier
void matrix_event_room_member_set_tpi_display_name (MatrixEventRoomMember *self
,const gchar *value
);
Set the value of the "tpi-display-name" property to value
.
A name which can be displayed to represent the user instead of their third party identifier
self |
the MatrixEventRoomMember instance to modify |
|
value |
the new value of the "tpi-display-name" property |
const gchar *
matrix_event_room_member_get_tpi_signed_mxid
(MatrixEventRoomMember *self
);
Get and return the current value of the "tpi-signed-mxid" property.
The invited matrix user ID. Must be equal to the user_id property of the event.
void matrix_event_room_member_set_tpi_signed_mxid (MatrixEventRoomMember *self
,const gchar *value
);
Set the value of the "tpi-signed-mxid" property to value
.
The invited matrix user ID. Must be equal to the user_id property of the event.
self |
the MatrixEventRoomMember instance to modify |
|
value |
the new value of the "tpi-signed-mxid" property |
const gchar *
matrix_event_room_member_get_tpi_signed_token
(MatrixEventRoomMember *self
);
Get and return the current value of the "tpi-signed-token" property.
The token property of the containing third_party_invite object.
void matrix_event_room_member_set_tpi_signed_token (MatrixEventRoomMember *self
,const gchar *value
);
Set the value of the "tpi-signed-token" property to value
.
The token property of the containing third_party_invite object.
self |
the MatrixEventRoomMember instance to modify |
|
value |
the new value of the "tpi-signed-token" property |
JsonNode *
matrix_event_room_member_get_tpi_signature
(MatrixEventRoomMember *self
);
Get and return the current value of the "tpi-signature" property.
A single signature from the verifying server, in the format specified by the Signing Events section of the server-server API.
void matrix_event_room_member_set_tpi_signature (MatrixEventRoomMember *self
,JsonNode *value
);
Set the value of the "tpi-signature" property to value
.
A single signature from the verifying server, in the format specified by the Signing Events section of the server-server API.
self |
the MatrixEventRoomMember instance to modify |
|
value |
the new value of the "tpi-signature" property |
MatrixEventState ** matrix_event_room_member_get_invite_room_state (MatrixEventRoomMember *self
,int *result_length1
);
Get and return the current value of the "invite-room-state" property.
A subset of the state of the room at the time of the invite, if membership is invite.
void matrix_event_room_member_set_invite_room_state (MatrixEventRoomMember *self
,MatrixEventState **value
,int value_length1
);
Set the value of the "invite-room-state" property to value
.
A subset of the state of the room at the time of the invite, if membership is invite.
self |
the MatrixEventRoomMember instance to modify |
|
value |
the new value of the "invite-room-state" property |
const gchar *
matrix_event_room_member_get_user_id (MatrixEventRoomMember *self
);
Get and return the current value of the "user-id" property.
The user ID whom this event relates to.
void matrix_event_room_member_set_user_id (MatrixEventRoomMember *self
,const gchar *value
);
Set the value of the "user-id" property to value
.
The user ID whom this event relates to.
self |
the MatrixEventRoomMember instance to modify |
|
value |
the new value of the "user-id" property |
struct MatrixEventRoomMember { MatrixEventState parent_instance; MatrixEventRoomMemberPrivate * priv; };
Class for representing a room membership events
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 stripped state events. These events provide information on a few select state events such as the room name.
struct MatrixEventRoomMemberClass { MatrixEventStateClass parent_class; };
The class structure for MATRIX_EVENT_TYPE_ROOM_MEMBER
. All the fields in this structure are private and should never be accessed directly.