janboddez / import-from-mastodon

Automatically turn toots—short messages on Mastodon—into WordPress posts.
GNU General Public License v3.0
13 stars 2 forks source link

Toot threads #4

Open janboddez opened 3 years ago

janboddez commented 3 years ago

Don't think we'll want to poll for replies as well (and repeat this, because of new replies, etc.), but threads might be worth looking into.

It should be possible to get the in_reply_to_id and use it to look up a "parent" status, and then either explicitly link to it in the post content, or choose to insert the status as a comment rather than a separate post.

This should probably go into a separate, add-on plugin. Or not.

janboddez commented 3 years ago

This should probably go into a separate, add-on plugin. Or not.

Like, we could store the in_reply_to_id as a custom field. And let a custom plugin / some theme tweaks handle the rest.

janboddez commented 2 years ago

So, we could recognize statuses with an in_reply_to_id and look for that ID. If it exists, this is a "reply-to-self" (unless we switched instances and IDs are being mixed up, which is why we should compare full URLs only) and we could import the toot as a comment instead (we'd also have to look through earlier comments, to enable threading).

Or prepend its content with a notice that could trigger a webmention.

For responses to others, it'd be nice if we could just add a bit of context, like a username or toot URL.

janboddez commented 2 years ago

For now, let's stick with a tiny bit of context, as per 3e1cd3d.