This commit is contained in:
Hugh Rundle 2023-09-25 15:29:01 +10:00
parent c95f160216
commit 01a56540d0
No known key found for this signature in database
GPG key ID: A7E35779918253F9
3 changed files with 4 additions and 14 deletions

View file

@ -256,4 +256,5 @@ class Move(Verb):
allow_external_connections=allow_external_connections, allow_external_connections=allow_external_connections,
) )
else: else:
return None # we might do something with this to move other objects at some point
pass

View file

@ -6,9 +6,6 @@ from bookwyrm import activitypub
from .activitypub_mixin import ActivityMixin from .activitypub_mixin import ActivityMixin
from .base_model import BookWyrmModel from .base_model import BookWyrmModel
from . import fields from . import fields
from .status import Status
from bookwyrm.models import User
class Move(ActivityMixin, BookWyrmModel): class Move(ActivityMixin, BookWyrmModel):
"""migrating an activitypub user account""" """migrating an activitypub user account"""
@ -34,14 +31,6 @@ class Move(ActivityMixin, BookWyrmModel):
activity_serializer = activitypub.Move activity_serializer = activitypub.Move
# pylint: disable=unused-argument
@classmethod
def ignore_activity(cls, activity, allow_external_connections=True):
"""don't bother with incoming moves of unknown objects"""
# TODO
pass
class MoveUser(Move): class MoveUser(Move):
"""migrating an activitypub user account""" """migrating an activitypub user account"""

View file

@ -41,9 +41,9 @@ class MoveUser(View):
return redirect("user-feed", username=request.user.username) return redirect("user-feed", username=request.user.username)
except (PermissionDenied): except PermissionDenied:
form.errors["target"] = [ form.errors["target"] = [
"You must set this server's user as an alias on the user you wish to move to before moving" "Set this user as an alias on the user you wish to move to before moving"
] ]
data = {"form": form, "user": request.user} data = {"form": form, "user": request.user}
return TemplateResponse(request, "preferences/move_user.html", data) return TemplateResponse(request, "preferences/move_user.html", data)