ActivityPub 연동 게시물에서 HTML 코드 제거

Ok, this is a potential corner case but maybe still interesting.

Posts imported with rss-polling contain HTML code. If these posts are federated, most of the HTML code breaks and goes through as plain text.

In an ideal world, at least links would be translated. But if this is too much hassle, at the very least it would be good to scrap the HTML code, leaving the text.

A couple of screenshots to illustrate the problem:

Discourse topic imported via RSS:

This is how it looks on Mastodon:

Why are we federating posts imported via RSS? The use case is: we are a community of podcasts, we import new episodes via RSS for listeners to like and comment in one place, and we want to offer these podcasts a window to the Fediverse, where they might get more listeners, comments and likes – without adding more work on their busy plates.

Just for your context, when ActivityPub content is federated (from any platform) it is typically federated as HTML. We will alway federate Discourse posts as HTML by default.

What you probably want is a custom filter for ActivityPub content. We may add that at some point soonish, however this is a relatively specific use case, and it’s not at the top of the priority list.

I understand. Do you think this is something we could try to push via Marketplace? It is a specific use case but it impacts us fully.

#marketplace에 요청을 게시해 보는 것도 나쁘지 않아요!

게시된 스크린샷을 살펴보면 여기에는 거의 확실하게 어떤 종류의 버그가 있는 것 같습니다. 다만, 이것이 Mastodon 쪽 문제인지 Discourse 쪽 문제인지는 판단하기 어렵습니다.

가장 복잡한 HTML이라도 Mastodon이 파싱할 때 단순히 일반 텍스트로 변환되어야 합니다. 여기에서 일어나는 것처럼 깨진 HTML 마크업이 되는 것은 말이 되지 않습니다.

또한, https://socialhub.activitypub.rocks/t/remove-html-code-from-activitypub-federated-posts/5293에서 이 스레드를 볼 때 왜 이미지가 없는지 궁금합니다.

불행히도, 여기에서 누가 잘못한 것인지 판단하기 위해 ActivityPub에서 주제 자체를 볼 수 없습니다. 서버가 406 Not Acceptable을 반환하기 때문입니다:

curl -H 'Accept: application/activity+json' https://red.podkasts.org/t/el-canto-de-la-tripulacion-n-36-nuevas-voces/23408/1

Mastodon에서 해당 객체를 검색해도 결과가 반환되지 않습니다.

@nightpool 님, 확인해 주셔서 감사합니다. 해당 계정을 팔로우하고 있기 때문에 Mastodon 타임라인에서 게시물을 볼 수 있지만, Discourse의 원본 게시물이 아닌 URL을 어떻게 얻어야 하는지 모르겠습니다. 원하시면 해당 액터를 팔로우하신 후, 테스트 목적으로 다른 게시물을 연동(federate)해 드리겠습니다.

어쨌든, 저는 곧 이 요청을 #marketplace에 제출할 계획입니다.