Add useraction support (rocketchat). Closes #772 (#794)

This commit is contained in:
Wim 2019-04-08 23:30:22 +02:00 committed by GitHub
parent 7a24de15e4
commit 5677c912a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -108,6 +108,11 @@ func (b *Brocketchat) Send(msg config.Message) (string, error) {
msg.Channel = strings.TrimPrefix(msg.Channel, "#") msg.Channel = strings.TrimPrefix(msg.Channel, "#")
channel := &models.Channel{ID: b.getChannelID(msg.Channel), Name: msg.Channel} channel := &models.Channel{ID: b.getChannelID(msg.Channel), Name: msg.Channel}
// Make a action /me of the message
if msg.Event == config.EventUserAction {
msg.Text = "_" + msg.Text + "_"
}
// Delete message // Delete message
if msg.Event == config.EventMsgDelete { if msg.Event == config.EventMsgDelete {
if msg.ID == "" { if msg.ID == "" {