mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-26 14:51:37 +01:00
Remove redundant code in AtomSerializer and spec (#3528)
* Remove redundant status.reply? in AtomSerializer#object * Cover AtomSerializer more
This commit is contained in:
parent
dab8fc4584
commit
ce7c0def88
3 changed files with 1488 additions and 139 deletions
|
@ -107,7 +107,7 @@ class AtomSerializer
|
||||||
serialize_status_attributes(object, status)
|
serialize_status_attributes(object, status)
|
||||||
|
|
||||||
append_element(object, 'link', nil, rel: :alternate, type: 'text/html', href: TagManager.instance.url_for(status))
|
append_element(object, 'link', nil, rel: :alternate, type: 'text/html', href: TagManager.instance.url_for(status))
|
||||||
append_element(object, 'thr:in-reply-to', nil, ref: TagManager.instance.uri_for(status.thread), href: TagManager.instance.url_for(status.thread)) if status.reply? && !status.thread.nil?
|
append_element(object, 'thr:in-reply-to', nil, ref: TagManager.instance.uri_for(status.thread), href: TagManager.instance.url_for(status.thread)) unless status.thread.nil?
|
||||||
append_element(object, 'ostatus:conversation', nil, ref: conversation_uri(status.conversation)) unless status.conversation_id.nil?
|
append_element(object, 'ostatus:conversation', nil, ref: conversation_uri(status.conversation)) unless status.conversation_id.nil?
|
||||||
|
|
||||||
object
|
object
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Fabricator(:follow_request) do
|
Fabricator(:follow_request) do
|
||||||
account
|
account
|
||||||
target_account { Fabricate(:account) }
|
target_account { Fabricate(:account, locked: true) }
|
||||||
end
|
end
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue