MatrixSDK.Client.StateEvent (matrix_sdk v0.2.0) View Source
Convenience functions for building state events.
Link to this section Summary
Functions
Returns a StateEvent struct of type m.room.join_rules.
Returns a StateEvent struct of type m.room.topic.
Link to this section Types
Specs
Link to this section Functions
Specs
Returns a StateEvent struct of type m.room.join_rules.
Example
iex> MatrixSDK.Client.StateEvent.join_rules("!someroom:matrix.org", "public")
%MatrixSDK.Client.StateEvent{
content: %{join_rule: "public"},
type: "m.room.join_rules",
room_id: "!someroom:matrix.org",
state_key: ""
}
Specs
Returns a StateEvent struct of type m.room.topic.
Example
iex> MatrixSDK.Client.StateEvent.topic("!someroom:matrix.org", "Example room topic")
%MatrixSDK.Client.StateEvent{
content: %{topic: "Example room topic"},
type: "m.room.topic",
room_id: "!someroom:matrix.org",
state_key: ""
}