Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show image uris as actual images inline in messages #12

Open
nikolaiwarner opened this issue Jun 6, 2018 · 11 comments
Open

Show image uris as actual images inline in messages #12

nikolaiwarner opened this issue Jun 6, 2018 · 11 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@nikolaiwarner
Copy link
Member

If we can detect that a uri sent within a message is an image, we should try to show that image inline in the message.

And also have an option to enable/disable the feature.

@nikolaiwarner nikolaiwarner added enhancement New feature or request good first issue Good for newcomers labels Aug 15, 2018
@masukomi
Copy link

given the emphasis on encrypted chats, calling out to an external url to download an image is a potential security risk for people discussing sensitive material. It would expose their IPs and other potential metadata

This could work if there was some "click to load image" type thing.

I think a better solution would be to actually transmit the images via cabal. I don't know much about dat, but It would be good if it could be done similarly to how SSB does it where we can optionally download the blobs. that way folks on low bandwidth connections could still participate in the chat without getting bogged down trying to download an image.

@hackergrrl
Copy link
Member

I'd really like it if we had a good p2p blob resolver, so you could post all sorts of things:

  • dat://...
  • ipfs://...
  • ssb://...
  • magnet://...

and then it would check if you have/use that p2p network and download it when you'd like it.

If we really want to keep data within the network, we could use a hyperdb trick where each user has a separate "content feed" that they can post binary blobs to. Unlike the main message feed (which is what we use to send chat messages), the content feed would be opt-in: you'd need to explicitly ask for entries in it. This functionality comes for free with hypercore, which cabal is built on.

@cblgh
Copy link
Member

cblgh commented Aug 18, 2018 via email

@todrobbins todrobbins added this to Pull Queue in Cabal Desktop Jun 20, 2019
@todrobbins
Copy link
Member

todrobbins commented Jun 20, 2019

Related: #14

See also: https://github.com/cabal-club/cabal-desktop-mini/tree/files, which addresses this feature request by creating a dat archive for shared files. I agree that having a toggle to hide the embeds would be necessary, especially to hide flashy GIFs, etc.

@warcode
Copy link

warcode commented Jan 12, 2021

As someone who only cares about the confidentiality of message content and not metadata, and only would hang out with friends, optional direct content embeds seems like it would be a good idea? At least until whatever perfect solution is planned can be implemented.

@cblgh
Copy link
Member

cblgh commented Jan 12, 2021 via email

@cblgh
Copy link
Member

cblgh commented Jan 13, 2021

@khubo raises the excellent idea of using @RangerMauve's p2p-fetch for allowing cross-protocol fetching of images 🧠🤯

@RangerMauve
Copy link

If you use electron you can integrate it into the protocol handlers so you could just put urls into the src attribute. :o

@cblgh
Copy link
Member

cblgh commented Jan 13, 2021

@RangerMauve we do use electron! have you done that in agregore somewhere?

@hackergrrl
Copy link
Member

hackergrrl commented Jan 13, 2021

great idea @RangerMauve on p2p-fetch! it'd be great to build this out to support fetching and publishing of {dat,ipfs,hypercore,etc}

@RangerMauve
Copy link

I have some code for converting fetch interfaces to protocol handlers for Electron here: https://github.com/AgregoreWeb/agregore-browser/blob/master/app/protocols/fetch-to-handler.js

I combine that with dat-fetch here: https://github.com/AgregoreWeb/agregore-browser/blob/master/app/protocols/hyper-protocol.js

And with ipfs-fetch here: https://github.com/AgregoreWeb/agregore-browser/blob/master/app/protocols/ipfs-protocol.js

I register the handlers on the electron session here: https://github.com/AgregoreWeb/agregore-browser/blob/master/app/protocols/index.js#L72

With those in place you can use the fetch() API in the electron side with the protocols without needing to bundle extra libraries, and any image or video src tags will automatically work with hyper:// and ipfs:// URLs.

Yeah, I'd like to work on p2p-fetch a bit more soon 😁

There's a bug in Electron 11 where the response headers aren't properly available for custom protocols, but that might still work in electron 9 or whatever this is using.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
Cabal Desktop
Pull Queue
Development

No branches or pull requests

7 participants