Closed poljar closed 5 years ago
Since you are on this, I know there are terminals on linux like "terminator" etc that will show images, anyway that the plugin can support image preview if terminal allows it? or have some sort of weechat trigger etc.. just and idea.
I don't think that this would be possible, we can't even hack around and add the URL escape code, it gets filtered out by Weechat or ncurses. The rule of thumb is if ncurses doesn't support it it's probably near impossible to do it.
I know ranger allows this, and I think(not sure) it used ncurses I tent to use only TUI apps and sometimes adding external hooks also you can get it working like https://wiki.vifm.info/index.php/How_to_preview_images worth to check
Ranger as well as vifm use w3imgdisplay
. I'm not sure if it's possible to incorporate that into weechat from a script. If someone figures out a way to do this I'm all for it.
@poljar I will look into this see what I can get working..
So to get this working the room buffer class should know the homeserver url and the mxc_to_http() function in the nio Api class should take a homeserver argument. The same thing should happen to the encrypted_mxt_to_plumb() function.
Later on there will be some big RoomBuffer class refactoring and change how room events are processed which will make all of this more organic.
Matrix Content (MXC) URIs are currently transformed to HTTP URIs solely based on the origin home-server of the content.
This ends up creating HTTP URIs that return a 404 error.