wrapped some presence procs

This commit is contained in:
array-in-a-matrix 2023-12-13 21:01:18 -05:00
parent 67955e0e2c
commit 4d2e2c6c81
2 changed files with 13 additions and 1 deletions

View file

@ -9,6 +9,16 @@ proc newMatrixClient*(homeserver, token: cstring, storage: Storage, cryptoStore:
proc getServerVersions*(client: Client): ServerVersions {.importjs: "#.getServerVersions()".}
# TODO: returns promise that is needed
proc setRoomAccountData*(client: Client, eventType, roomId: cstring, content: Content) {.importjs: "#.setRoomAccountData(#, #, #)".}
proc getPresenceStatus*(client: Client) {.importjs: "#.getPresenceStatus()".}
# TODO: returns promise that is needed
proc getPresenceStatusFor*(client: Client, userId: cstring) {.importjs: "#.getPresenceStatusFor(#)".}
# TODO: returns promise that is needed
proc setPresenceStatus*(presence: PresenceState, statusMessage: cstring = nil) {.importjs: "#.setPresenceStatus(#, #)".}
proc start*(client: Client, filter: Filter = nil) {.importjs: "#.start(#)".} #? returns a promise
proc onRoomMessage*(client: Client, callback: proc(roomId: cstring, event: Event)) {.importjs: "#.on('room.message', #)".}

View file

@ -30,4 +30,6 @@ type Appservice* = ref object
type IPreprocessor* = ref object
type ServerVersions* = ref object
type ServerVersions* = ref object
type PresenceState* = ref object