Ac5000 / lemmy_account_sync

Sync your Lemmy instance accounts. Tries to sync all accounts with the same communities, blocked users, blocked communities, etc.
32 stars 0 forks source link

Unsubscribe? #1

Open sanicki opened 1 year ago

sanicki commented 1 year ago

Does the sync also unsubscribe if the community subscription does not exist in the "Main Account"? If not, should it?

Example 1:

I run the script once. It subscribes "Account 1" to all the communities subscribed to by "Main Account."

Later, I unsubscribe from a community on "Main Account."

If I run the script again will that community subscription be removed from "Account 1"?

Example 2:

I run the script once. It subscribes "Account 1" to all the communities subscribed to by "Main Account."

The instance of "Main Account" temporarily goes offline, so I start using "Account 1."

I subscribe to a new community using "Account 1" before my "Main Account" instance is back online and I switch back.

If run the script again will that community subscription be removed from "Account 1," added to "Main Account," or remain on "Account 1" without being added to "Main Account"?

Ac5000 commented 1 year ago

Thank you for raising this issue/question.

Does the sync also unsubscribe if the community subscription does not exist in the "Main Account"?

Currently when the script is ran, it pulls a total list of subscribed communities between all accounts. Then attempts to make all accounts match that total "pool" of subscriptions. This is regardless of account name/order.

Example:

Account 1

Subbed to Community 1 and Community 2

Account 2

Subbed to Community 1 and Community 3

Script is ran

Account 1

Subbed to Community 1, 2, and 3.

Account 2

Subbed to Community 1, 2, and 3.

If not, should it?

The current method/script helped me treat all my accounts as a kind of "pseudo single account". However, you raise a good issue in that I didn't think of cases where you'd unsubscribe.

What I will do is attempt to make an alternate function that focuses on making all accounts match the "Main Account". E.g. Subscribe to accounts that are subscribed in "Main" and unsubscribe to accounts that are not. This will be configurable with a flag I will add to the config file. Unfortunately I haven't found an easy way to identify which account/action was most recent or I'd make the updates happen based on most recent actions between accounts.

I'll respond to/close this issue once I complete the update. It might be a day or so as I am currently a bit limited on time.

Thank you again, and let me know if you need any further explanation or any other questions.