mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 22:56:21 +00:00
feat: almacenar el perfil de le actore en la base de datos
This commit is contained in:
parent
5c22015fe2
commit
019101ba1e
2 changed files with 9 additions and 1 deletions
|
@ -19,7 +19,7 @@ class ActivityPub
|
|||
return unless response.ok?
|
||||
return if response.miss? && actor.content.present?
|
||||
|
||||
actor.update(content: FastJsonparser.parse(response.body))
|
||||
actor.object.update(content: FastJsonparser.parse(response.body))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -25,5 +25,13 @@ class ActivityPub
|
|||
|
||||
@mention ||= "@#{content['preferredUsername']}@#{instance.hostname}"
|
||||
end
|
||||
|
||||
def object
|
||||
@object ||= ActivityPub::Object::Person.find_or_initialize_by(uri: uri)
|
||||
end
|
||||
|
||||
def content
|
||||
object.content
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue