Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

commit 82c45caf04ba6c4cffddec83df6d3151b87f9635 Author: Wim <wim@42.be> Date: Sat May 23 20:51:04 2020 +0000 Implement xep-0245 (xmpp). Closes #1137 (#1144) diff --git a/bridge/xmpp/xmpp.go b/bridge/xmpp/xmpp.go index 7122534..75b2b59 100644 --- a/bridge/xmpp/xmpp.go +++ b/bridge/xmpp/xmpp.go @@ -7012 +7019 @@ func (b *Bxmpp) Send(msg config.Message) (string, error) {   if msg.Event == config.EventMsgDelete {   return "", nil   } +   b.Log.Debugf("=> Receiving %#v", msg)     if msg.Event == config.EventAvatarDownload {   return b.cacheAvatar(&msg), nil   }   + // Make a action /me of the message, prepend the username with it. + // https://xmpp.org/extensions/xep-0245.html + if msg.Event == config.EventUserAction { + msg.Username = "/me " + msg.Username + } +   // Upload a file (in XMPP case send the upload URL because XMPP has no native upload support).   if msg.Extra != nil {   for _, rmsg := range helper.HandleExtra(&msg, b.General) {