Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Account Migration (Move) #5475

Closed
11 tasks
tamaina opened this issue Oct 2, 2019 · 39 comments · Fixed by #10507 or #10592
Closed
11 tasks

Account Migration (Move) #5475

tamaina opened this issue Oct 2, 2019 · 39 comments · Fixed by #10507 or #10592
Assignees
Labels
✨Feature This adds/improves/enhances a feature 🌌Federation The Federation/ActivityPub feature 🔥high priority

Comments

@tamaina
Copy link
Member

tamaina commented Oct 2, 2019

Summary

アカウントの引っ越し機能(Mastodon 3に搭載されたのと同じ、ActivityPub標準)

ユーザーが設定画面で引っ越し先アカウント(事前に作成しておき、引っ越し元のアカウントを専用のフォームに入力しておく)を指定して引っ越し操作を指示すると、プログラムは

  • 引っ越し元アカウントのフォロワーが引っ越し先アカウントをフォローするようにする
    • ActivityPubではMove Activityをフォロワーへ送信し受信したサーバーは同様の対応をする
    • ブロックやミュート、リストも追従
    • 「通知のみでフォローなどを自動で移行しない」のを選択することもできるように?
  • 引っ越し元アカウントが操作できないようにする(データの出力等はできる)
  • 引っ越しから30日以上は引っ越しできないようにする

Related to #4706

MastodonではMoveを送らずmovedToの設定だけをする?redirectも行えるが、実装する?

RD

Recieve movedTo/Move Activity

  • Add movedToUri to DB user entity
  • Pack and display movedTo
  • Deny users to follow users with movedToUri/movedTo
  • Store movedTo by Account Update activity or Move activity
  • Re-follow the new account, add mute/block relationships with that, and modify user lists to add that when receiving account Move activity
  • Account Aliases = alsoKnownAs uri collection

Set movedTo, Start Migrating

  • Implement the endpoint and ui to start migrating
    • Check alsoKnownAs (Continue only if requested account is included in alsoKnownAs of the account to which to move)
  • Send Account Move activity
  • Lock down api call to prevent new postings, etc but to allow exporting lists, etc
  • Stop accepting followings
  • Prohibit migration for a certain period of time (30 days)
@tamaina tamaina added ✨Feature This adds/improves/enhances a feature 🌌Federation The Federation/ActivityPub feature 🤔Difficulty: Medium 🧩API Interface between server and client and removed 🧩API Interface between server and client labels Oct 2, 2019
@tamaina
Copy link
Member Author

tamaina commented Oct 2, 2019

Mastodonが実装している以上、とりあえずMoveアクティビティの受信とその処理にだけでも対応しておいた方が良い気がする

@tamaina
Copy link
Member Author

tamaina commented May 25, 2020

mstdn.jpの閉鎖が発表されました。

めいめいはあんまり乗り気じゃないけど(実装難しいし)、ユーザーの利便性を考えると付けた方がいいのかなと思います。

引っ越し元アカウントのフォロワーが引っ越し先アカウントをフォローするようにする

フォロワーには引っ越し通知を送るだけで、通知から任意にフォローしてもらうとかでもいいかもしれない。

@4ioskd
Copy link

4ioskd commented Sep 15, 2021

Implement moving account
https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3524

Recently in Pleroma git repo, this pull request is developed in progress.
最近プレロマのgitリポジトリで、このプルリクが現在進行形で開発されてます。

@tamaina
Copy link
Member Author

tamaina commented Sep 16, 2021

ブロックとミュートも追従するようにするとよさそう(Mastodonはもうなっている?)

@4ioskd
Copy link

4ioskd commented Sep 16, 2021

In mastodon,You can export a csv file of block,mute,domain blocks and bookmarks list.
マストドンではブロック、ミュート、ドメインブロック、ブックマークのリストをcsvファイルでエキスポートできます。

@mei23
Copy link
Contributor

mei23 commented Sep 16, 2021

マストドンではブロック、ミュート、ドメインブロック、ブックマークのリストをcsvファイルでエキスポートできます。

ちゃうちゃう、ブロミューフォローじゃなくて ブロミューフォローの方だわ

@4ioskd
Copy link

4ioskd commented Sep 16, 2021

At any time you want, you can go to Settings > Export and download a CSV file for your current followed accounts, your currently created lists, your currently blocked accounts, your currently muted accounts, and your currently blocked domains.
https://docs.joinmastodon.org/user/moving/

なるほど。。

@tamaina tamaina changed the title アカウントの引っ越し Account Moving May 17, 2022
@tamaina tamaina pinned this issue May 17, 2022
@tamaina
Copy link
Member Author

tamaina commented May 17, 2022

pinした

@syuilo
Copy link
Member

syuilo commented May 17, 2022

priorityどのくらいかしら

@tamaina
Copy link
Member Author

tamaina commented May 17, 2022

highかlowで言ったらhighだと個人的には思っている
(ただし、私がいきなり連合周りに手を突っ込むより、他の人が作業したほうが効率的だと思う)

@mei23
Copy link
Contributor

mei23 commented May 17, 2022

  • moveToを取得しておく => 雑魚い
    • API/UIにまで反映させる => ちょっとめんどい
  • Move Activityに対して引越し先を検証する => 罠はあるけどやれば出来る
    • Move Activityで何かをする => 何をするのか (Follow/Mute/Block/List追従?ユーザーに選ばせる?通知のみ?) みたいなのを決めるコミュニケーションがめんどい

って感じなのだわ

@tamaina
Copy link
Member Author

tamaina commented May 17, 2022

データベース変更まで実装していただければAPI/UIは私かしゅいろでやる

何をするのか (Follow/Mute/Block/List追従?ユーザーに選ばせる?通知のみ?) みたいなのを決める

各ユーザーの設定で、Moveを受け取った時の動作としてFollow/Mute/Block/List追従 or 通知のみを選ばせておくのがいいのではないかと(Move発出側で決めるわけではないでしょ…?)

@mei23
Copy link
Contributor

mei23 commented May 17, 2022

AP周りの罠はこのあたり

  • 引越し元と引越し先をそれぞれ取得してINSERTする実装にすると、元と先 双方が新規だった場合にループするので避けること。
  • 引っ越し先がループさせられるのを防ぐこと。
  • 引っ越し元と先を検証するときは最新のデータを使用すること。

@robflop
Copy link
Contributor

robflop commented May 17, 2022

I think it's important to keep what @Gargron said in issue #8690 in mind when implementing this.

@tamaina
Copy link
Member Author

tamaina commented May 17, 2022

引越し元のアカウントをフォロー解除するという仕様は、ノートがホームから消えたりフォロワー限定投稿が見られなくなったりするので良くなさそう

https://misskey.m544.net/notes/7180d338bda8be52d24e905f

@mei23
Copy link
Contributor

mei23 commented May 17, 2022

さらすなって

考え方は多様だから最終的にオプションにするしかない感だわ

@robflop
Copy link
Contributor

robflop commented May 17, 2022

UXのことよりGargronさんが話してたフォロワーを売るの可能性の問題を防ぐのはもっと大事だと思う

元アカウントのフォロワー限定のノートとかがまた見たい場合で元垢を自分で再フォローのはどうだろう?

@tamaina
Copy link
Member Author

tamaina commented May 17, 2022

説明をするようなことではないけれど、何でもかんでもオプションにするのは、実装やテストが面倒になるし、ユーザーに混乱をもたらす

UXのことよりGargronさんが話してたフォロワーを売る可能性の問題を防ぐのはもっと大事だと思う

その意見は理解しますが、引用リノート(ブースト)機能に代表されるように、MisskeyはUXを重視してきました。

@tamaina
Copy link
Member Author

tamaina commented May 17, 2022

あ、でもユーザー各位でフォローを外すかどうかのオプションはあっても良さそう
(ここのオプション1こが2こに増えるのはあんまり変わらなさそう)

@ThatOneCalculator

This comment was marked as off-topic.

@robflop

This comment was marked as off-topic.

@ThatOneCalculator
Copy link
Contributor

ThatOneCalculator commented May 17, 2022

Ah. DeepL has failed me again 😔

image

@Johann150
Copy link
Contributor

日本語の話: 引越しって言うとノートやドライブの内容まで移行するものと誤解されがちなので、アカウント移行と表現したほうがいいかしら?

I think in English it would be the other way around: "Migrating" an account would mean to me that all the contents are migrated too, like in a database migration sense? But when I read "move" in a Fediverse context it almost always means the user is using a different account now.

@Johann150
Copy link
Contributor

I think a new user.movedTo column or similar will be necessary. It can contain a user id (foreign key) and be nullable. Necessary both to track whether a user has already moved and for displaying the moved to account in the UI.

There are some more edge cases to be considered with this, in regard to the foreign key constraint on movedTo. What should happen if the move target account gets deleted? (ON DELETE)

  1. Both NO ACTION and RESTRICT can not be the right choice, because it would disallow user deletion. (might be an issue with GDPR) And there is no sensible default so SET DEFAULT is also not an option.
  2. Delete the previous accounts as well? (CASCADE) Could be resource intensive, and because there are other things connected to user deletion, would need to track user deletion jobs for those accounts as well.
  3. Delete the movedTo information? (SET NULL) Would be the same as "undoing" a move and allow the user to send another Move activity.

What should happen if the move target has a movedTo value already? Not accepting moves into accounts that already moved disallows "circular moves", like Move(A -> B) + Move(B -> A).


I think automatic follower migration could be regulated by a field user_profile.autoAcceptMove similar to the existing user_profile.autoAcceptFollowed. Pleroma has a similar setting called "Allow auto-follow when following account moves".

The move notification should probably include a follow button. Or a "migrate" button to handle other features of missey as well (Lists, Groups, Blocks, ...)? And who should receive the notification? If only followers receive the notification, Blocks etc. may not be handled correctly because there can not be a following between them.

My personal opinion is that Mastodon and Gargron are trying to solve a social issue with technology. So I'm not sure if it is a good idea to automatically unfollow. I think Pleroma and maybe also Mastodon take into account followings in the past to compute visibility which Misskey does not, so our problems are a bit different in those regards.

@tamaina tamaina changed the title Account Moving Account Migration Nov 17, 2022
@tamaina tamaina changed the title Account Migration Account Migration (Move) Nov 17, 2022
@tamaina
Copy link
Member Author

tamaina commented Nov 17, 2022

Requirements defined in more detail
#5475 (comment)

@ThatOneCalculator

This comment was marked as abuse.

@tamaina
Copy link
Member Author

tamaina commented Dec 20, 2022

いる?(面倒くさくなってきた)

@robflop
Copy link
Contributor

robflop commented Dec 20, 2022

個人的にはいる

@saschanaz
Copy link
Member

あったらもっと自由に個人インスタンス作れます(もしインスタンス閉店することになるときアカウント移籍できるので)

@tamaina
Copy link
Member Author

tamaina commented Feb 24, 2023

「大きいインスタンスでフォロワーを集めて他のインスタンスに移転する」みたいにしてもらえると分散化が促進されそう

@syuilo
Copy link
Member

syuilo commented Feb 24, 2023

やるか

@tamaina
Copy link
Member Author

tamaina commented Feb 24, 2023

#9997

これマージしてからの方が良さそう

@rinsuki
Copy link
Contributor

rinsuki commented Mar 2, 2023

元アカウントのフォロワー限定のノートとかがまた見たい場合で元垢を自分で再フォローのはどうだろう?

亀レスだけど、元アカウントが手動承認の場合再フォローが通らない確率が高い (Mastodonとかだとたぶん元アカウント触れなくなる)

@saschanaz
Copy link
Member

Mastodonとかだとたぶん元アカウント触れなくなる

これ4.0+では普通に触れました(警告はでます)

@rinsuki
Copy link
Contributor

rinsuki commented Mar 4, 2023

Mastodon 4.1.0 でも普通に触れない (取り消しはできるが…) image

@tassoman
Copy link
Contributor

tassoman commented Apr 8, 2023

すごーい、ありがとうございます。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨Feature This adds/improves/enhances a feature 🌌Federation The Federation/ActivityPub feature 🔥high priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants