aboutsummaryrefslogtreecommitdiff
path: root/appservice/account.go
diff options
context:
space:
mode:
Diffstat (limited to 'appservice/account.go')
-rw-r--r--appservice/account.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/appservice/account.go b/appservice/account.go
index e507230..311f266 100644
--- a/appservice/account.go
+++ b/appservice/account.go
@@ -81,7 +81,7 @@ func (a *Account) joinedInternal(roomId RoomID) error {
log.Debugf("Joined %s (%s)\n", roomId, a.MatrixUser)
- err = mxRoomInvite(mx_room_id, a.MatrixUser)
+ err = mx.RoomInvite(mx_room_id, a.MatrixUser)
if err != nil && strings.Contains(err.Error(), "already in the room") {
err = nil
}
@@ -107,7 +107,7 @@ func (a *Account) leftInternal(roomId RoomID) error {
log.Printf("Left %s (%s)\n", roomId, a.MatrixUser)
- err = mxRoomKick(mx_room_id, a.MatrixUser, fmt.Sprintf("got leave room event on %s", a.Protocol))
+ err = mx.RoomKick(mx_room_id, a.MatrixUser, fmt.Sprintf("got leave room event on %s", a.Protocol))
if err != nil && strings.Contains(err.Error(), "not in the room") {
err = nil
}
@@ -130,7 +130,7 @@ func (a *Account) userInfoUpdatedInternal(user UserID, info *UserInfo) error {
}
if info.DisplayName != "" {
- err2 := mxProfileDisplayname(mx_user_id, fmt.Sprintf("%s (%s)", info.DisplayName, a.Protocol))
+ err2 := mx.ProfileDisplayname(mx_user_id, fmt.Sprintf("%s (%s)", info.DisplayName, a.Protocol))
if err2 != nil {
err = err2
}
@@ -167,7 +167,7 @@ func (a *Account) roomInfoUpdatedInternal(roomId RoomID, author UserID, info *Ro
}
if info.Topic != "" {
- err2 := mxRoomTopicAs(mx_room_id, info.Topic, as_mxid)
+ err2 := mx.RoomTopicAs(mx_room_id, info.Topic, as_mxid)
if err2 != nil {
err = err2
}
@@ -175,7 +175,7 @@ func (a *Account) roomInfoUpdatedInternal(roomId RoomID, author UserID, info *Ro
if info.Name != "" {
name := fmt.Sprintf("%s (%s)", info.Name, a.Protocol)
- err2 := mxRoomNameAs(mx_room_id, name, as_mxid)
+ err2 := mx.RoomNameAs(mx_room_id, name, as_mxid)
if err2 != nil {
err = err2
}
@@ -211,7 +211,7 @@ func (a *Account) eventInternal(event *Event) error {
return err
}
- err = mxRoomInvite(mx_room_id, mx_user_id)
+ err = mx.RoomInvite(mx_room_id, mx_user_id)
if err != nil {
if strings.Contains(err.Error(), "already in the room") {
err = nil
@@ -219,7 +219,7 @@ func (a *Account) eventInternal(event *Event) error {
return err
}
- return mxRoomJoinAs(mx_room_id, mx_user_id)
+ return mx.RoomJoinAs(mx_room_id, mx_user_id)
} else if event.Type == EVENT_LEAVE {
log.Printf("%s join %s %s", a.Protocol, event.Author, event.Room)
mx_room_id, err := dbGetMxRoom(a.Protocol, event.Room)
@@ -227,7 +227,7 @@ func (a *Account) eventInternal(event *Event) error {
return err
}
- return mxRoomLeaveAs(mx_room_id, mx_user_id)
+ return mx.RoomLeaveAs(mx_room_id, mx_user_id)
} else {
log.Printf("%s msg %s %s", a.Protocol, event.Author, event.Room)
mx_room_id := ""
@@ -249,6 +249,6 @@ func (a *Account) eventInternal(event *Event) error {
typ = "m.emote"
}
- return mxSendMessageAs(mx_room_id, typ, event.Text, mx_user_id)
+ return mx.SendMessageAs(mx_room_id, typ, event.Text, mx_user_id)
}
}