this post was submitted on 22 Jul 2023
3 points (80.0% liked)

ActivityPub

674 readers
5 users here now

This is a community dedicated to discussing technical details related to ActivityPub.
We welcome developers familiar with the protocol!

https://activitypub.rocks/
https://www.w3.org/TR/activitypub/

Other ActivityPub communities on Lemmy

founded 5 years ago
MODERATORS
 

Hello everyone! Recently I have removed a couple of bot users from my Lemmy instance via DB query (I removed them from person table). Those bots were subscribing to hundreds of communities on other instances which I don't really want to spend resources on fetching new posts and updates.

I have purged those communities from my instance but they keep reappearing. As far as I can tell, this happens because other instances still "think" that users from my instance (bots, which don't exist already) are still subscribed, and therefore send updates to my instance.

How can I completely get rid of those communities?

top 7 comments
sorted by: hot top controversial new old
[–] RoundSparrow@lemmy.ml 3 points 1 year ago* (last edited 1 year ago) (1 children)

The proper way would be to probably make an API client that logs in to each of these accounts, queries the list of subscribed communities, and unfollows each community. But I'm not even sure the backend deals with all this correctly... I'm working on testing to add it.

I don’t really want to spend resources on fetching new posts and updates.

As you have discovered, your instance is not initiating a "fetch", it is actually the other servers sending to you. Those other instances have your now-gone users (on your server) still subscribed to the communities.

Short of defederating, you have to get the other servers to remove your subscribers to those communities, or at least unsubscribe. This kind of thing is currently not trivial to do, likely requires new code or direct SQL statements for those other servers to execute.

[–] pinkolik@random-hero.com 2 points 1 year ago (1 children)

So I guess, I'm just gonna have to wait until Lemmy devs implement this?

[–] RoundSparrow@lemmy.ml 3 points 1 year ago (1 children)

I am actively working on testing code to try and reproduce what happens in these situations when a remote server does not unsubscribe from communities. Doing a direct SQL delete of rows from the persons table is perhaps out of scope, but there is a lot of cleanup. There was an explosion of instances (new servers) out there and many have since gone offline. So I am sure the the topic of how to clean up old orphan data will keep coming up.

[–] pinkolik@random-hero.com 2 points 1 year ago (1 children)

Oh, it's great to hear! Where can I follow your progress on this topic?

[–] RoundSparrow@lemmy.ml 2 points 1 year ago

A lot going on right now regarding federation consistency between servers, so not sure, it's scattered on a variety of topics. You are welcome to comment reply to me every few days if you are curious.

[–] RoundSparrow@lemmy.ml 1 points 1 year ago* (last edited 1 year ago) (1 children)

I have removed a couple of bot users from my Lemmy instance via DB query (I removed them from person table)

If I understand, you still have them in your local_user database table? I'm not sure if they would still be matched up records of local_user to person with a delete from person table.

[–] pinkolik@random-hero.com 2 points 1 year ago

I'm not sure I know what is a "local_user" database

load more comments
view more: next ›