diff options
author | Tiago Epifânio <26820396+tfve@users.noreply.github.com> | 2020-05-10 23:21:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-11 00:21:56 +0200 |
commit | 70622343315f6755987d8cb56fb1b2302d07ce90 (patch) | |
tree | 46e6276b0561806879cb8f89f5ebe39ffaa47703 /bridge/matrix | |
parent | 97545695257b30bcaf80e1b64bbed6cce2303be6 (diff) | |
download | matterbridge-msglm-70622343315f6755987d8cb56fb1b2302d07ce90.tar.gz matterbridge-msglm-70622343315f6755987d8cb56fb1b2302d07ce90.tar.bz2 matterbridge-msglm-70622343315f6755987d8cb56fb1b2302d07ce90.zip |
Avoid creating invalid url when the user doesn't have an avatar (matrix) (#1130)
Diffstat (limited to 'bridge/matrix')
-rw-r--r-- | bridge/matrix/matrix.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bridge/matrix/matrix.go b/bridge/matrix/matrix.go index 824870cf..78779c87 100644 --- a/bridge/matrix/matrix.go +++ b/bridge/matrix/matrix.go @@ -372,6 +372,8 @@ func (b *Bmatrix) getAvatarURL(sender string) string { return "" } url := strings.ReplaceAll(mxcURL, "mxc://", b.GetString("Server")+"/_matrix/media/r0/thumbnail/") - url += "?width=37&height=37&method=crop" + if url != "" { + url += "?width=37&height=37&method=crop" + } return url } |