mirror of
https://github.com/42wim/matterbridge.git
synced 2024-12-19 01:22:38 +01:00
Avoid creating invalid url when the user doesn't have an avatar (matrix) (#1130)
This commit is contained in:
parent
9754569525
commit
7062234331
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user