Skip to content

Conversation

@Smidqe
Copy link
Contributor

@Smidqe Smidqe commented Oct 19, 2021

MERGE ONLY AFTER #84

Fixes #33

Aliases:
/img [image url]
/image [image url]

Will suppress the message if the link is not a valid or supported image.

@Smidqe Smidqe changed the title Feature: Image command Feature: Chat images Oct 19, 2021
@Smidqe Smidqe marked this pull request as draft October 22, 2021 19:39
@Smidqe Smidqe marked this pull request as ready for review October 23, 2021 10:48
@Smidqe Smidqe marked this pull request as draft October 23, 2021 10:49
@Smidqe Smidqe marked this pull request as ready for review October 23, 2021 11:02
@Smidqe Smidqe marked this pull request as draft October 27, 2021 11:38
@Smidqe Smidqe marked this pull request as ready for review November 5, 2021 16:34
@Smidqe Smidqe marked this pull request as draft November 7, 2021 05:58
@Smidqe Smidqe marked this pull request as ready for review November 12, 2021 10:53
Copy link
Member

@Atte Atte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The img should probably call scrollBuffersToBottom() when the load event fires. Otherwise the chat buffer might not scroll properly, since the "message received" scroll happens before the image loads, and thus before the image has its final height.

There's also currently a /video filter, which creates a <video autoplay loop muted playsinline src="url" referrerpolicy="no-referrer" alt="Loading video..." onload="scrollBuffersToBottom()" /> instead of an <img ...>. Maybe the /img command coudld use the file extension to decide when to do that instead, so that the commands could be combined? Would be extra useful for weird stuff like ".gifv".

@Smidqe
Copy link
Contributor Author

Smidqe commented Nov 13, 2021

Would a combined /media command be better then, and determine the message type (image, video) on server side?

@Atte
Copy link
Member

Atte commented Nov 13, 2021

Nah /img is fine as the command, since that's what people are already used to. /video and /media could be extra aliases for when people are too drunk to remember how to tube.

@Smidqe
Copy link
Contributor Author

Smidqe commented Nov 13, 2021

Oh right, forgot the aliases

@Smidqe Smidqe marked this pull request as draft November 13, 2021 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Convert /img from a filter to an actual feature

2 participants