From 70622343315f6755987d8cb56fb1b2302d07ce90 Mon Sep 17 00:00:00 2001 From: Tiago Epifânio <26820396+tfve@users.noreply.github.com> Date: Sun, 10 May 2020 23:21:56 +0100 Subject: Avoid creating invalid url when the user doesn't have an avatar (matrix) (#1130) --- bridge/matrix/matrix.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bridge') 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 } -- cgit v1.2.3