mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-30 03:26:21 +00:00
Merge branch 'issue-15109-1' of https://0xacab.org/sutty/sutty into production.panel.sutty.nl
This commit is contained in:
commit
3bfe3c1d32
2 changed files with 9 additions and 1 deletions
|
@ -19,7 +19,7 @@ class ActivityPub
|
||||||
return unless response.ok?
|
return unless response.ok?
|
||||||
return if response.miss? && actor.content.present?
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -25,5 +25,13 @@ class ActivityPub
|
||||||
|
|
||||||
@mention ||= "@#{content['preferredUsername']}@#{instance.hostname}"
|
@mention ||= "@#{content['preferredUsername']}@#{instance.hostname}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def object
|
||||||
|
@object ||= ActivityPub::Object::Person.find_or_initialize_by(uri: uri)
|
||||||
|
end
|
||||||
|
|
||||||
|
def content
|
||||||
|
object.content
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue