Don't bother sending a RemoteUrl for DM images if they're not downloaded yet, since they can't be loaded without an authentication token anyway
This commit is contained in:
parent
5c79decd7b
commit
8d29e25823
@ -37,12 +37,10 @@
|
||||
</div>
|
||||
{{end}}
|
||||
{{range .Images}}
|
||||
{{/* DM images can only be loaded with an authenticated session. So sending the RemoteUrl
|
||||
in an <img> tag is not useful; it will just HTTP 401 */}}
|
||||
<img class="dm-message__embedded-image"
|
||||
{{if .IsDownloaded}}
|
||||
src="/content/images/{{.LocalFilename}}"
|
||||
{{else}}
|
||||
src="{{.RemoteURL}}"
|
||||
{{end}}
|
||||
width="{{.Width}}" height="{{.Height}}"
|
||||
onclick="image_carousel.querySelector('img').src = this.src; image_carousel.showModal();"
|
||||
>
|
||||
|
Loading…
x
Reference in New Issue
Block a user