aboutsummaryrefslogtreecommitdiff
path: root/appservice
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-02-23 20:24:50 +0100
committerAlex Auvolat <alex@adnab.me>2020-02-23 20:24:50 +0100
commitec9bc9b7520a8e8c3c372943126df985329dcd18 (patch)
tree000683f506359d0463e37010996aab8422620e78 /appservice
parent0f6be9663e6e8b954d24596c455a704d42499a52 (diff)
downloadeasybridge-ec9bc9b7520a8e8c3c372943126df985329dcd18.tar.gz
easybridge-ec9bc9b7520a8e8c3c372943126df985329dcd18.zip
go fmt
Diffstat (limited to 'appservice')
-rw-r--r--appservice/account.go18
-rw-r--r--appservice/db.go2
2 files changed, 10 insertions, 10 deletions
diff --git a/appservice/account.go b/appservice/account.go
index f1f9d13..4bb2dfe 100644
--- a/appservice/account.go
+++ b/appservice/account.go
@@ -286,24 +286,24 @@ func (a *Account) eventInternal(event *Event) error {
if err != nil {
return err
}
- content := map[string]interface{} {
- "body": mxfile.Filename(),
+ content := map[string]interface{}{
+ "body": mxfile.Filename(),
"filename": mxfile.Filename(),
- "url": fmt.Sprintf("mxc://%s/%s", mxfile.MxcServer, mxfile.MxcMediaId),
+ "url": fmt.Sprintf("mxc://%s/%s", mxfile.MxcServer, mxfile.MxcMediaId),
}
if sz := mxfile.ImageSize(); sz != nil {
content["msgtype"] = "m.image"
- content["info"] = map[string]interface{} {
+ content["info"] = map[string]interface{}{
"mimetype": mxfile.Mimetype(),
- "size": mxfile.Size(),
- "w": sz.Width,
- "h": sz.Height,
+ "size": mxfile.Size(),
+ "w": sz.Width,
+ "h": sz.Height,
}
} else {
content["msgtype"] = "m.file"
- content["info"] = map[string]interface{} {
+ content["info"] = map[string]interface{}{
"mimetype": mxfile.Mimetype(),
- "size": mxfile.Size(),
+ "size": mxfile.Size(),
}
}
err = mx.SendAs(mx_room_id, "m.room.message", content, mx_user_id)
diff --git a/appservice/db.go b/appservice/db.go
index 646dae3..9c3280c 100644
--- a/appservice/db.go
+++ b/appservice/db.go
@@ -41,7 +41,7 @@ func InitDb() error {
type DbCache struct {
gorm.Model
- Key string `gorm:"unique_index"`
+ Key string `gorm:"unique_index"`
Value string
}