- addReaction
void addReaction(string room_id, string event_id, string emoji)
Undocumented in source. Be warned that the author may not have intended to support it.
- buildUrl
string buildUrl(string endpoint, string[string] params, string apiVersion, string section)
Undocumented in source. Be warned that the author may not have intended to support it.
- createDirectMessageRoom
string createDirectMessageRoom(string user_id)
Creates the direct message room and stores it's ID in account data
- createRoom
string createRoom(MatrixRoomPresetEnum preset, bool showInDirectory, string roomAlias, string name, bool is_direct, string[] inviteUsers)
Undocumented in source. Be warned that the author may not have intended to support it.
- deleteDevicesUsingPassword
void deleteDevicesUsingPassword(string[] devices, string password)
Deletes devices, uses a password for authentication
NOTE: This will only work if the homeserver requires ONLY a password authentication
- get
JSONValue get(string url, JSONValue data)
Undocumented in source. Be warned that the author may not have intended to support it.
- getAccountData
JSONValue getAccountData(string type)
Gets custom account data with specified type
- getDeviceInfo
MatrixDeviceInfo getDeviceInfo(string device_id)
Get information for a single device by it's device id
- getDevices
MatrixDeviceInfo[] getDevices()
Get information about all devices for current user
- getDirectMessageRoom
string getDirectMessageRoom(string user_id)
Gets the direct message room for given user.
Returns null if the room doesn't exist
- getEvent
MatrixEvent getEvent(string room_id, string event_id, bool keepJSONReference)
Gets an event from a room by it's ID
- getJoinedRooms
string[] getJoinedRooms()
Deletes devices, uses a password for authentication
NOTE: This will only work if the homeserver requires ONLY a password authentication
- getOrCreateDirectMessageRoom
string getOrCreateDirectMessageRoom(string user_id)
Undocumented in source. Be warned that the author may not have intended to support it.
- getPresence
MatrixPresence getPresence(string userId)
Gets the specified user's presence
- getRoomData
JSONValue getRoomData(string room_id, string type)
Get custom account data with specified type for the given room
NOTE: Room aliases don't have the same data as their resolved room ids
NOTE 2: Synapse doesn't seem to validate the room id, so you can put anything in place of it
- getRoomMembers
string[] getRoomMembers(string room_id)
Undocumented in source. Be warned that the author may not have intended to support it.
- joinRoom
string joinRoom(string roomId)
Joins a room by it's room id or alias, retuns it's room id
- makeHttpRequest
JSONValue makeHttpRequest(string url, JSONValue data, HTTP http)
Undocumented in source. Be warned that the author may not have intended to support it.
- makeParamString
string makeParamString(string[string] params, char concat)
Undocumented in source. Be warned that the author may not have intended to support it.
- markRead
void markRead(string roomId, string eventId)
Sets the position of the read marker for given room
- options
JSONValue options(string url, JSONValue data)
Undocumented in source. Be warned that the author may not have intended to support it.
- parseEvent
MatrixEvent parseEvent(JSONValue ev, bool keepJSONReference, string optRoomId)
Parses an event from a JSONValue, use casting or the type field to determine it's type.
keepJSONReference determines if the JSONValue should be kept in the MatrixEvent object.
You can override this function in your program if you need support for more event types.
- passwordLogin
void passwordLogin(string user, string password, string device_id)
Log in to the matrix server using a username and password.
deviceId is optional, if none provided, server will generate it's own
If provided, server will invalidate the previous access token for this device
- post
JSONValue post(string url, JSONValue data)
Undocumented in source. Be warned that the author may not have intended to support it.
- put
JSONValue put(string url, JSONValue data)
Undocumented in source. Be warned that the author may not have intended to support it.
- resolveRoomAlias
string resolveRoomAlias(string roomalias)
Resolves the room alias to a room id, no authentication required
- sendFile
void sendFile(string roomId, string filename, string mxc, string msgtype)
Sends a m.room.message with specified msgtype and MXC URI
- sendHTML
void sendHTML(string roomId, string html, string fallback, string msgtype)
Sends a m.room.message with format of org.matrix.custom.html
fallback is the plain text version of html if the client doesn't support html
- sendImage
void sendImage(string roomId, string filename, string mxc)
Sends a m.room.message with type of m.image with specified MXC URI
- sendString
void sendString(string roomId, string text, string msgtype)
- setAccountData
void setAccountData(string type, JSONValue data)
Sets custom account data for specified type
- setDeviceName
void setDeviceName(string name, string device_id)
Updates the display name for a device
device_id is optional, if null, current device ID will be used
- setPresence
void setPresence(MatrixPresenceEnum presence, string status_msg)
Sets your presence
NOTE: No clients support status messages yet
- setRoomData
void setRoomData(string room_id, string type, JSONValue data)
Set custom account data with specified type for the given room
NOTE: Room aliases don't have the same data as their resolved room ids
NOTE 2: Synapse doesn't seem to validate the room id, so you can put anything in place of it
- sync
void sync()
- tokenLogin
void tokenLogin(string access_token, string device_id)
Log in to the matrix server using an existing access token assigned to a device_id.
- translateRoomId
string translateRoomId(string roomId)
Undocumented in source. Be warned that the author may not have intended to support it.
- uploadFile
string uploadFile(void[] data, string filename, string mimetype)
Uploads a file to the server and returns the MXC URI