MatrixEventRoomMember

MatrixEventRoomMember — Class for representing a room membership events

Functions

Types and Values

Description

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.

Functions

MATRIX_EVENT_TYPE_ROOM_MEMBER

#define MATRIX_EVENT_TYPE_ROOM_MEMBER (matrix_event_room_member_get_type ())

The type for MatrixEventRoomMember.


matrix_event_room_member_new ()

MatrixEventRoomMember *
matrix_event_room_member_new (void);

matrix_event_room_member_get_membership ()

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.

Parameters

self

the MatrixEventRoomMember instance to query

 

Returns

the value of the "membership" property


matrix_event_room_member_set_membership ()

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.

Parameters

self

the MatrixEventRoomMember instance to modify

 

value

the new value of the "membership" property

 

matrix_event_room_member_get_avatar_url ()

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.

Parameters

self

the MatrixEventRoomMember instance to query

 

Returns

the value of the "avatar-url" property


matrix_event_room_member_set_avatar_url ()

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.

Parameters

self

the MatrixEventRoomMember instance to modify

 

value

the new value of the "avatar-url" property

 

matrix_event_room_member_get_display_name ()

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.

Parameters

self

the MatrixEventRoomMember instance to query

 

Returns

the value of the "display-name" property


matrix_event_room_member_set_display_name ()

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.

Parameters

self

the MatrixEventRoomMember instance to modify

 

value

the new value of the "display-name" property

 

matrix_event_room_member_get_tpi_display_name ()

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

Parameters

self

the MatrixEventRoomMember instance to query

 

Returns

the value of the "tpi-display-name" property


matrix_event_room_member_set_tpi_display_name ()

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

Parameters

self

the MatrixEventRoomMember instance to modify

 

value

the new value of the "tpi-display-name" property

 

matrix_event_room_member_get_tpi_signed_mxid ()

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.

Parameters

self

the MatrixEventRoomMember instance to query

 

Returns

the value of the "tpi-signed-mxid" property


matrix_event_room_member_set_tpi_signed_mxid ()

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.

Parameters

self

the MatrixEventRoomMember instance to modify

 

value

the new value of the "tpi-signed-mxid" property

 

matrix_event_room_member_get_tpi_signed_token ()

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.

Parameters

self

the MatrixEventRoomMember instance to query

 

Returns

the value of the "tpi-signed-token" property


matrix_event_room_member_set_tpi_signed_token ()

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.

Parameters

self

the MatrixEventRoomMember instance to modify

 

value

the new value of the "tpi-signed-token" property

 

matrix_event_room_member_get_tpi_signature ()

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.

Parameters

self

the MatrixEventRoomMember instance to query

 

Returns

the value of the "tpi-signature" property


matrix_event_room_member_set_tpi_signature ()

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.

Parameters

self

the MatrixEventRoomMember instance to modify

 

value

the new value of the "tpi-signature" property

 

matrix_event_room_member_get_invite_room_state ()

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.

Parameters

self

the MatrixEventRoomMember instance to query

 

Returns

the value of the "invite-room-state" property


matrix_event_room_member_set_invite_room_state ()

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.

Parameters

self

the MatrixEventRoomMember instance to modify

 

value

the new value of the "invite-room-state" property

 

matrix_event_room_member_get_user_id ()

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.

Parameters

self

the MatrixEventRoomMember instance to query

 

Returns

the value of the "user-id" property


matrix_event_room_member_set_user_id ()

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.

Parameters

self

the MatrixEventRoomMember instance to modify

 

value

the new value of the "user-id" property

 

Types and Values

struct MatrixEventRoomMember

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

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.

Members

MatrixEventStateClass parent_class;

the parent class structure