MatrixSDK.Client.RoomEvent (matrix_sdk v0.2.0) View Source
Convenience functions for building room events.
Link to this section Summary
Functions
Returns a RoomEvent struct of type m.room.message.
Link to this section Types
Specs
Specs
event_type() :: :file | :notice | :text
Specs
Link to this section Functions
Specs
message(binary(), event_type(), content(), binary()) :: t()
Returns a RoomEvent struct of type m.room.message.
Example
iex> MatrixSDK.Client.RoomEvent.message("!someroom:matrix.org", :text, "Fire! Fire! Fire!", "transaction_id")
%MatrixSDK.Client.RoomEvent{
content: %{body: "Fire! Fire! Fire!", msgtype: "m.text"},
type: "m.room.message",
room_id: "!someroom:matrix.org",
transaction_id: "transaction_id"
}