mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-09 16:50:30 +00:00
Add support for edited messages (slack)
This commit is contained in:
parent
17b8b86d68
commit
4d2207aba7
@ -199,6 +199,11 @@ func (b *Bslack) handleSlackClient(mchan chan *MMMessage) {
|
||||
// ignore first message
|
||||
if count > 0 {
|
||||
flog.Debugf("Receiving from slackclient %#v", ev)
|
||||
if !b.Config.EditDisable && ev.SubMessage != nil {
|
||||
flog.Debugf("SubMessage %#v", ev.SubMessage)
|
||||
ev.User = ev.SubMessage.User
|
||||
ev.Text = ev.SubMessage.Text + b.Config.EditSuffix
|
||||
}
|
||||
// use our own func because rtm.GetChannelInfo doesn't work for private channels
|
||||
channel, err := b.getChannelByID(ev.Channel)
|
||||
if err != nil {
|
||||
|
@ -1,5 +1,6 @@
|
||||
# v0.12.0
|
||||
## Changes
|
||||
* general: edited messages are now being sent by default on discord/mattermost/telegram/gitter/slack. See "New Features"
|
||||
* gitter: The default support for edited messages enables experimental FAYE support for gitter.
|
||||
If you need stable code add EditDisable=true to your gitter configuration.
|
||||
|
||||
|
@ -364,6 +364,14 @@ NickFormatter="plain"
|
||||
#OPTIONAL (default 4)
|
||||
NicksPerRow=4
|
||||
|
||||
#Disable sending of edits to other bridges
|
||||
#OPTIONAL (default false)
|
||||
EditDisable=true
|
||||
|
||||
#Message to be appended to every edited message
|
||||
#OPTIONAL (default empty)
|
||||
EditSuffix=" (edited)"
|
||||
|
||||
#Whether to prefix messages from other bridges to mattermost with RemoteNickFormat
|
||||
#Useful if username overrides for incoming webhooks isn't enabled on the
|
||||
#slack server. If you set PrefixMessagesWithNick to true, each message
|
||||
|
Loading…
Reference in New Issue
Block a user