diff options
Diffstat (limited to 'bridge/helper/helper.go')
-rw-r--r-- | bridge/helper/helper.go | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/bridge/helper/helper.go b/bridge/helper/helper.go index 581a2c43..fb65d8d9 100644 --- a/bridge/helper/helper.go +++ b/bridge/helper/helper.go @@ -168,17 +168,23 @@ func HandleDownloadSize(logger *logrus.Entry, msg *config.Message, name string, // HandleDownloadData adds the data for a remote file into a Matterbridge gateway message. func HandleDownloadData(logger *logrus.Entry, msg *config.Message, name, comment, url string, data *[]byte, general *config.Protocol) { + HandleDownloadData2(logger, msg, name, "", comment, url, data, general) +} + +// HandleDownloadData adds the data for a remote file into a Matterbridge gateway message. +func HandleDownloadData2(logger *logrus.Entry, msg *config.Message, name, id, comment, url string, data *[]byte, general *config.Protocol) { var avatar bool logger.Debugf("Download OK %#v %#v", name, len(*data)) if msg.Event == config.EventAvatarDownload { avatar = true } msg.Extra["file"] = append(msg.Extra["file"], config.FileInfo{ - Name: name, - Data: data, - URL: url, - Comment: comment, - Avatar: avatar, + Name: name, + Data: data, + URL: url, + Comment: comment, + Avatar: avatar, + NativeID: id, }) } |