Thumbnail

rani/matterbridge.git

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

commit 54fb1fb613aad78974d2126c6d60b3334256d235 Author: Wim <wim@42.be> Date: Thu Feb 15 23:18:58 2018 +0000 Add SHA to FileInfo diff --git a/bridge/config/config.go b/bridge/config/config.go index d75d3e1..1cf0b9f 100644 --- a/bridge/config/config.go +++ b/bridge/config/config.go @@ -416 +417 @@ type FileInfo struct {   URL string   Size int64   Avatar bool + SHA string  }    type ChannelInfo struct { diff --git a/gateway/gateway.go b/gateway/gateway.go index 3d0a61e..c16264a 100644 --- a/gateway/gateway.go +++ b/gateway/gateway.go @@ -3626 +3627 @@ func (gw *Gateway) handleFiles(msg *config.Message) {   durl := gw.Config.General.MediaServerDownload + "/" + sha1sum + "/" + fi.Name   extra := msg.Extra["file"][i].(config.FileInfo)   extra.URL = durl + extra.SHA = sha1sum   msg.Extra["file"][i] = extra   req, _ := http.NewRequest("PUT", url, reader)   req.Header.Set("Content-Type", "binary/octet-stream")