diff --git a/bookwyrm/models/move.py b/bookwyrm/models/move.py index e6833b826..ef7cad372 100644 --- a/bookwyrm/models/move.py +++ b/bookwyrm/models/move.py @@ -7,6 +7,7 @@ from .activitypub_mixin import ActivityMixin from .base_model import BookWyrmModel from . import fields + class Move(ActivityMixin, BookWyrmModel): """migrating an activitypub user account""" @@ -31,6 +32,7 @@ class Move(ActivityMixin, BookWyrmModel): activity_serializer = activitypub.Move + class MoveUser(Move): """migrating an activitypub user account""" diff --git a/bookwyrm/templates/user/layout.html b/bookwyrm/templates/user/layout.html index c6f33540e..49bed1f9d 100755 --- a/bookwyrm/templates/user/layout.html +++ b/bookwyrm/templates/user/layout.html @@ -43,6 +43,7 @@ {% endspaceless %} {% endif %} +
{% if user.moved_to %}
diff --git a/bookwyrm/tests/models/test_user_model.py b/bookwyrm/tests/models/test_user_model.py index 9d6294768..838dd2e49 100644 --- a/bookwyrm/tests/models/test_user_model.py +++ b/bookwyrm/tests/models/test_user_model.py @@ -88,9 +88,11 @@ class User(TestCase): "https://www.w3.org/ns/activitystreams", "https://w3id.org/security/v1", { - "manuallyApprovesFollowers": "as:manuallyApprovesFollowers", - "schema": "http://schema.org#", "PropertyValue": "schema:PropertyValue", + "alsoKnownAs": {"@id": "as:alsoKnownAs", "@type": "@id"}, + "manuallyApprovesFollowers": "as:manuallyApprovesFollowers", + "movedTo": {"@id": "as:movedTo", "@type": "@id"}, + "schema": "http://schema.org#", "value": "schema:value", }, ], diff --git a/bookwyrm/views/preferences/move_user.py b/bookwyrm/views/preferences/move_user.py index 0c9eb1987..ec664c8eb 100644 --- a/bookwyrm/views/preferences/move_user.py +++ b/bookwyrm/views/preferences/move_user.py @@ -43,7 +43,7 @@ class MoveUser(View): except PermissionDenied: form.errors["target"] = [ - "Set this user as an alias on the user you wish to move to before moving" + "Set this user as an alias on the user you are moving to first" ] data = {"form": form, "user": request.user} return TemplateResponse(request, "preferences/move_user.html", data)