mirror of
https://github.com/Lomanic/presence-button-web
synced 2024-12-22 03:26:59 +00:00
Check matrix credentials early on init
This commit is contained in:
parent
257677b313
commit
91999707d0
3
main.go
3
main.go
@ -84,6 +84,9 @@ func init() {
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("error creating matrix client: %s", err))
|
||||
}
|
||||
if _, err := matrix.GetOwnStatus(); err != nil { // a way to quickly check if access token is valid
|
||||
panic(fmt.Sprintf("error getting matrix status: %s", err))
|
||||
}
|
||||
|
||||
if config.MATRIXROOM == "" {
|
||||
panic("MATRIXROOM is empty")
|
||||
|
Loading…
Reference in New Issue
Block a user