synac-chat / synac-legacy

Some IRC-like chat application that might become good one day
11 stars 1 forks source link

Link previewing? #16

Open jD91mZM2 opened 7 years ago

jD91mZM2 commented 7 years ago

Should there be link previewing in the client? Should it always preview (well, maybe optional?) or using some command or button or whatever? Because remember a site could be logging IPs, so if we want it to always preview we'd need the server to act as a VPN.

ttofis commented 7 years ago

Link previewing? That's a discussion about your client directly. So, by link previewing you mean cards that get formed from meta tags?

jD91mZM2 commented 7 years ago

By link previewing I mean showing images when you direct link them, or if it's not an image either nothing or the title.

ttofis commented 7 years ago

Can ncurses even do that? I mean show images?

jD91mZM2 commented 7 years ago

FYI: The client is not limited to cursive. Even though, I suspect Cursive/ncurses does not strip the escape character, so it might be possible to show colors.

termplay

ttofis commented 7 years ago

Yeah, I say too much trouble, but if you want to do it, do it!

tbodt commented 7 years ago

how about implement it, enable by default, have a switch to turn it off?

Mnpn commented 7 years ago

^ An option for it should definitely exist.

jD91mZM2 commented 7 years ago

Nice! But we should still have the server be some sort of proxy for the links, right? For safety:tm:?

ttofis commented 7 years ago

Wut no? What safety man? Its just link previewing, come on.

jD91mZM2 commented 7 years ago

But if you don't want to click that link? It can get your IP!

tbodt commented 7 years ago

that can be added later...

jD91mZM2 commented 7 years ago

Link previewing as a whole or server proxy around it?

ttofis commented 7 years ago

Obviously a client feature, but man, who does link previewing?? I only see stuff like this but in the form of cards like Twitter and even Discord. Meta's are what get displayed. I say make cards instead with this: http://ogp.me/

jD91mZM2 commented 7 years ago

In other words this is a huge "No"?

tbodt commented 7 years ago

how about the server has an api endpoint to fetch the open graph tags from a url

jD91mZM2 commented 7 years ago

Yeah I only meant on images for a start, and then maybe title.

ttofis commented 7 years ago

Title and images will be extremely easy to be done with opengraph

So, I suggest either: a) add two tags on the messageReceive packet for "urlTitle" and "urlImageUrl" b) New packet for this business.

jD91mZM2 commented 7 years ago

Sure, but we have to consider one thing: What if somebody posts an illegal link? The server owner could be held responsible for making a request to that site...

ttofis commented 7 years ago

What's the worst thing that could happen to the server owner? Do you think that if you send an awful site's link that happens to also have opengraph tags Discord wouldn't show it? I mean I don't get why are you so scared about this.

jD91mZM2 commented 7 years ago

I'm just considerate. We have to assume the worst out of everybody. Especially when the servers aren't in one location and we can't just say "oh that's user this and that, not me".

Imagine you create an unnamed server, and the first thing that happens is that somebody joins and starts spamming links to child pornography. Your server isn't using a VPN, and as far as any evesdroppers and DNS servers are aware, you're the one making the requests. Imagine the police showing up at your door, and you having to explain to them that the requests are made by users. Especially if you aren't a big company, but rather just some private person. It wouldn't be fun, and you could get into a lot of trouble.

tbodt commented 7 years ago

can we just have this not be a feature for now

jD91mZM2 commented 7 years ago

Sure! I never said it needed to be created right now.

ttofis commented 7 years ago

I agree with tbodt, its too early for that and a more client-sided feature (although it may involve a bit of server implementation too) so it can wait.

jD91mZM2 commented 6 years ago

This shouldn't be a thing in the original client. It could be a thing in the GTK rewrite though. But that's for later.

Mnpn commented 6 years ago

^ add to gtk pls