Merge pull request #141 from cheeaun/main

Update from main
This commit is contained in:
Chee Aun 2023-05-16 19:38:41 +08:00 committed by GitHub
commit 0cd9a2db6e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 1 deletions

View file

@ -138,6 +138,12 @@ And here I am. Building a Mastodon web client.
- [Statuzer](https://statuzer.com/)
- [More...](https://github.com/hueyy/awesome-mastodon/#clients)
## 💁‍♂️ Notice to all other social media client developers
Please, please copy the UI ideas and experiments from this app. I think some of them are pretty good and it would be great if more apps have them.
If you're not a developer, please tell your favourite social media client developers about this app and ask them to copy the UI ideas and experiments.
## License
[MIT](https://cheeaun.mit-license.org/).

View file

@ -965,7 +965,12 @@ function Status({
'a[href]:not(.u-url):not(.mention):not(.hashtag)',
),
)
.filter((a) => isMastodonLinkMaybe(a.href))
.filter((a) => {
const url = a.href;
const isPostItself =
url === status.url || url === status.uri;
return !isPostItself && isMastodonLinkMaybe(url);
})
.forEach((a, i) => {
unfurlMastodonLink(currentInstance, a.href).then(
(result) => {
@ -1076,6 +1081,9 @@ function Status({
</div>
)}
{!!card &&
card?.url !== status.url &&
card?.url !== status.uri &&
/^https/i.test(card?.url) &&
!sensitive &&
!spoilerText &&
!poll &&