8000 Move user serialization into its own class by Floppy · Pull Request #3499 · manyfold3d/manyfold · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Move user serialization into its own class #3499

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

Merged
merged 1 commit into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,7 @@ def self.send_reset_password_instructions(attributes = {})
end

def to_activitypub_object
{
"@context": {
f3di: "http://purl.org/f3di/ns#"
},
"f3di:concreteType": "User"
}
ActivityPub::UserSerializer.new(self).serialize
end

private
Expand Down
12 changes: 12 additions & 0 deletions app/serializers/activity_pub/user_serializer.rb
40AE
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module ActivityPub
class UserSerializer < BaseSerializer
def serialize
{
"@context": {
f3di: "http://purl.org/f3di/ns#"
},
"f3di:concreteType": "User"
}
end
end
end
Loading
0