generated from array-in-a-matrix/matrix-bot-template
make Client's element public
This commit is contained in:
parent
33761b8191
commit
0f3341de9d
1 changed files with 3 additions and 3 deletions
|
@ -1,17 +1,17 @@
|
|||
import std/asyncjs
|
||||
{.emit:"import { MatrixAuth } from 'matrix-bot-sdk';".}
|
||||
|
||||
type auth = ref object
|
||||
homeserverUrl: cstring
|
||||
|
||||
type Client = ref object
|
||||
homeserverUrl: cstring
|
||||
accessToken: cstring
|
||||
homeserverUrl*: cstring
|
||||
accessToken*: cstring
|
||||
|
||||
proc newMatrixAuth*(homeserver: cstring): auth {.importjs: "new MatrixAuth(#)".}
|
||||
|
||||
proc passwordLogin*(auth: auth, username, password: cstring): Client {.importjs: "await #.passwordLogin(#, #)".}
|
||||
proc passwordLogin*(auth: auth, username, password, deviceName: cstring): Client {.importjs: "await #.passwordLogin(#, #, #)".}
|
||||
|
||||
proc passwordRegister*(localpart, password: cstring): Client {.importjs: "await #.passwordRegister(#, #)".}
|
||||
proc passwordRegister*(localpart, password, deviceName: cstring): Client {.importjs: "await #.passwordRegister(#, #, #)".}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue