diff options
author | Patrick Connolly <patrick.c.connolly@gmail.com> | 2018-11-09 03:45:40 +0800 |
---|---|---|
committer | Wim <wim@42.be> | 2018-11-08 20:45:40 +0100 |
commit | 3d281b3316a68a265efb0f024755e8d1c3863bd5 (patch) | |
tree | 55c6f428b23a3857a7f45263769a84acf633c130 /gateway/gateway.go | |
parent | ea86849a5855e58fd4633117416a21fde753751f (diff) | |
download | matterbridge-msglm-3d281b3316a68a265efb0f024755e8d1c3863bd5.tar.gz matterbridge-msglm-3d281b3316a68a265efb0f024755e8d1c3863bd5.tar.bz2 matterbridge-msglm-3d281b3316a68a265efb0f024755e8d1c3863bd5.zip |
Add ability to show when user is typing across Slack bridges (#559)
Diffstat (limited to 'gateway/gateway.go')
-rw-r--r-- | gateway/gateway.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gateway/gateway.go b/gateway/gateway.go index d4c84650..3a6fa1e0 100644 --- a/gateway/gateway.go +++ b/gateway/gateway.go @@ -297,7 +297,11 @@ func (gw *Gateway) handleMessage(msg config.Message, dest *bridge.Bridge) []*BrM continue } } - flog.Debugf("=> Sending %#v from %s (%s) to %s (%s)", msg, msg.Account, originchannel, dest.Account, channel.Name) + + // Too noisy to log like other events + if msg.Event != config.EVENT_USER_TYPING { + flog.Debugf("=> Sending %#v from %s (%s) to %s (%s)", msg, msg.Account, originchannel, dest.Account, channel.Name) + } msg.Channel = channel.Name msg.Avatar = gw.modifyAvatar(origmsg, dest) @@ -337,6 +341,9 @@ func (gw *Gateway) ignoreMessage(msg *config.Message) bool { // check if we need to ignore a empty message if msg.Text == "" { + if msg.Event == config.EVENT_USER_TYPING { + return false + } // we have an attachment or actual bytes, do not ignore if msg.Extra != nil && (msg.Extra["attachments"] != nil || |