aboutsummaryrefslogtreecommitdiff
path: root/appservice/db.go
diff options
context:
space:
mode:
Diffstat (limited to 'appservice/db.go')
-rw-r--r--appservice/db.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/appservice/db.go b/appservice/db.go
index 6423b95..5cefd30 100644
--- a/appservice/db.go
+++ b/appservice/db.go
@@ -88,13 +88,13 @@ func dbGetMxRoom(protocol string, roomId connector.RoomID) (string, error) {
if must_create {
alias := roomAlias(protocol, roomId)
// Lookup alias
- mx_room_id, err := mxDirectoryRoom(fmt.Sprintf("#%s:%s", alias, config.MatrixDomain))
+ mx_room_id, err := mx.DirectoryRoom(fmt.Sprintf("#%s:%s", alias, config.MatrixDomain))
// If no alias found, create room
if err != nil {
name := fmt.Sprintf("%s (%s)", roomId, protocol)
- mx_room_id, err = mxCreateRoom(name, alias, []string{})
+ mx_room_id, err = mx.CreateRoom(name, alias, []string{})
if err != nil {
log.Printf("Could not create room for %s: %s", name, err)
return "", err
@@ -125,7 +125,7 @@ func dbGetMxPmRoom(protocol string, them connector.UserID, themMxId string, usMx
if must_create {
name := fmt.Sprintf("%s (%s)", them, protocol)
- mx_room_id, err := mxCreateDirectRoomAs([]string{usMxId}, themMxId)
+ mx_room_id, err := mx.CreateDirectRoomAs([]string{usMxId}, themMxId)
if err != nil {
log.Printf("Could not create room for %s: %s", name, err)
return "", err
@@ -161,7 +161,7 @@ func dbGetMxUser(protocol string, userId connector.UserID) (string, error) {
if must_create {
username := userMxId(protocol, userId)
- err := mxRegisterUser(username)
+ err := mx.RegisterUser(username)
if err != nil {
if mxE, ok := err.(*mxlib.MxError); !ok || mxE.ErrCode != "M_USER_IN_USE" {
log.Printf("Could not register %s: %s", username, err)
@@ -170,7 +170,7 @@ func dbGetMxUser(protocol string, userId connector.UserID) (string, error) {
}
mxid := fmt.Sprintf("@%s:%s", username, config.MatrixDomain)
- mxProfileDisplayname(mxid, fmt.Sprintf("%s (%s)", userId, protocol))
+ mx.ProfileDisplayname(mxid, fmt.Sprintf("%s (%s)", userId, protocol))
user = DbUserMap{
Protocol: protocol,