matrix: get the type from the correct variable.
run gofmt
This commit is contained in:
@@ -161,7 +161,8 @@ func (b *Bmatrix) handleEvent(ev *matrix.Event) {
|
||||
|
||||
// Text must be a string
|
||||
if rmsg.Text, ok = ev.Content["body"].(string); !ok {
|
||||
b.Log.Errorf("Content[body] wasn't a %T ?", rmsg.Text)
|
||||
b.Log.Errorf("Content[body] is not a string: %T\n%#v",
|
||||
ev.Content["body"], ev.Content)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -166,15 +166,14 @@ func (b *Bslack) handleMessageEvent(ev *slack.MessageEvent) (*config.Message, er
|
||||
}
|
||||
|
||||
rmsg := config.Message{
|
||||
Text: ev.Text,
|
||||
Channel: channelInfo.Name,
|
||||
Account: b.Account,
|
||||
ID: "slack " + ev.Timestamp,
|
||||
Extra: map[string][]interface{}{},
|
||||
Text: ev.Text,
|
||||
Channel: channelInfo.Name,
|
||||
Account: b.Account,
|
||||
ID: "slack " + ev.Timestamp,
|
||||
Extra: map[string][]interface{}{},
|
||||
ParentID: ev.ThreadTimestamp,
|
||||
}
|
||||
|
||||
|
||||
if b.useChannelID {
|
||||
rmsg.Channel = "ID:" + channelInfo.ID
|
||||
}
|
||||
|
||||
@@ -310,9 +310,9 @@ func (gw *Gateway) handleMessage(msg config.Message, dest *bridge.Bridge) []*BrM
|
||||
msg.Channel = originchannel
|
||||
}
|
||||
|
||||
msg.ParentID = gw.getDestMsgID(canonicalParentMsgID, dest, channel)
|
||||
msg.ParentID = gw.getDestMsgID(canonicalParentMsgID, dest, channel)
|
||||
if msg.ParentID == "" {
|
||||
msg.ParentID = canonicalParentMsgID
|
||||
msg.ParentID = canonicalParentMsgID
|
||||
}
|
||||
|
||||
mID, err := dest.Send(msg)
|
||||
|
||||
Reference in New Issue
Block a user