News for hackers. Stuff that matters.
Re:How to store your app's entire state in the url by owl57 on Monday January 09, 2023 @08:48PM (#34319274)
At least in Telegram, this works for at most one link per message, and quickly fills the screen if you send multiple such messages.

And I believe that there is no standard API to get previews of non-public websites in a work chat, you need to develop site-specific bots or something like that?

Re:How to store your app's entire state in the url by hunter2_ on Monday January 09, 2023 @11:38PM (#34320574)
> previews of non-public websites

It would be interesting if browsers / OSes / apps offered a way to use the browser's cookie jar / basic auth headers / whatever sessioning scheme in whatever apps the user decides should display authenticated previews.

Re:How to store your app's entire state in the url by withinboredom on Tuesday January 10, 2023 @01:45AM (#34321354)
I just include a screenshot. It’s not that hard.
Re:How to store your app's entire state in the url by gdprrrr on Tuesday January 10, 2023 @02:03AM (#34321475)
Plesse no
Re:How to store your app's entire state in the url by efreak on Wednesday January 11, 2023 @12:52AM (#34335459)
Examples of why this is bad:

* http://example.com/settings/transferownership?to=efreak * http://example.com/settings/deleteaccount?confirm=true * http://example.com/sendmoney?to=efreak&amount=10000

Might need a redirect. Do previews follow redirects? Does your poorly-written chat app filter urls by protocol, or does it just look for a token with '://'? A good app will allow me to link to things like steam://connect/IP so I can invite you to a game.

* tel:9005555555 (call a phone number. Fortunately, this requires confirmation these days, but what if you're on desktop or the app that does texting can directly make calls without invoking the dialer?) * steam://exitsteam (steam will exit if it's running)

Re:How to store your app's entire state in the url by WorldMaker on Tuesday January 10, 2023 @03:53PM (#34331305)
There is a standard for this. It's called oEmbed: https://oembed.com/

The chat host still likely needs access to the "non-public website" to discover and call its oEmbed API, so that's something you'd have to figure out, but any website anywhere can offer oEmbed metadata if it wishes.