mirror of
https://github.com/Lomanic/presence-button-web
synced 2024-11-25 06:57:30 +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 {
|
if err != nil {
|
||||||
panic(fmt.Sprintf("error creating matrix client: %s", err))
|
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 == "" {
|
if config.MATRIXROOM == "" {
|
||||||
panic("MATRIXROOM is empty")
|
panic("MATRIXROOM is empty")
|
||||||
|
Loading…
Reference in New Issue
Block a user