mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-12-25 06:05:39 +00:00
Disable user lookups on delete messages (slack) (#812)
This commit is contained in:
parent
aefa8a9341
commit
5f5d6c6e8a
@ -22,20 +22,20 @@ func (b *Bslack) handleSlack() {
|
|||||||
time.Sleep(time.Second)
|
time.Sleep(time.Second)
|
||||||
b.Log.Debug("Start listening for Slack messages")
|
b.Log.Debug("Start listening for Slack messages")
|
||||||
for message := range messages {
|
for message := range messages {
|
||||||
if message.Event != config.EventUserTyping {
|
// don't do any action on deleted/typing messages
|
||||||
|
if message.Event != config.EventUserTyping && message.Event != config.EventMsgDelete {
|
||||||
b.Log.Debugf("<= Sending message from %s on %s to gateway", message.Username, b.Account)
|
b.Log.Debugf("<= Sending message from %s on %s to gateway", message.Username, b.Account)
|
||||||
|
// cleanup the message
|
||||||
|
message.Text = b.replaceMention(message.Text)
|
||||||
|
message.Text = b.replaceVariable(message.Text)
|
||||||
|
message.Text = b.replaceChannel(message.Text)
|
||||||
|
message.Text = b.replaceURL(message.Text)
|
||||||
|
message.Text = html.UnescapeString(message.Text)
|
||||||
|
|
||||||
|
// Add the avatar
|
||||||
|
message.Avatar = b.users.getAvatar(message.UserID)
|
||||||
}
|
}
|
||||||
|
|
||||||
// cleanup the message
|
|
||||||
message.Text = b.replaceMention(message.Text)
|
|
||||||
message.Text = b.replaceVariable(message.Text)
|
|
||||||
message.Text = b.replaceChannel(message.Text)
|
|
||||||
message.Text = b.replaceURL(message.Text)
|
|
||||||
message.Text = html.UnescapeString(message.Text)
|
|
||||||
|
|
||||||
// Add the avatar
|
|
||||||
message.Avatar = b.users.getAvatar(message.UserID)
|
|
||||||
|
|
||||||
b.Log.Debugf("<= Message is %#v", message)
|
b.Log.Debugf("<= Message is %#v", message)
|
||||||
b.Remote <- *message
|
b.Remote <- *message
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user