matrix_sdk v0.1.0 MatrixSDK.Client.RoomEvent 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
Link to this section Functions
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"
}