diff options
Diffstat (limited to 'appservice/matrix.go')
-rw-r--r-- | appservice/matrix.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/appservice/matrix.go b/appservice/matrix.go index 75bcaa1..2c4562e 100644 --- a/appservice/matrix.go +++ b/appservice/matrix.go @@ -13,6 +13,12 @@ import ( . "git.deuxfleurs.fr/Deuxfleurs/easybridge/mxlib" ) +func ezbrMxId() string { + return fmt.Sprintf("@%s:%s", registration.SenderLocalpart, config.MatrixDomain) +} + +// ---- + var httpClient *http.Client func init() { @@ -234,6 +240,13 @@ func mxPutStateAs(room string, event_type string, key string, content map[string return err } +func mxRoomNameAs(room string, name string, as_user string) error { + content := map[string]interface{} { + "name": name, + } + return mxPutStateAs(room, "m.room.name", "", content, as_user) +} + func mxRoomTopicAs(room string, topic string, as_user string) error { content := map[string]interface{} { "topic": topic, |