0
0
Fork 0

Sensitive content federates using the "nsfw" hashtag

This commit is contained in:
Eugen Rochko 2016-12-11 22:49:25 +01:00
parent f90133d2ad
commit e90fcb46e3
3 changed files with 18 additions and 5 deletions

View file

@ -53,8 +53,8 @@ module AtomBuilderHelper
xml.author(&block)
end
def category(xml, tag)
xml.category(term: tag.name)
def category(xml, term)
xml.category(term: term)
end
def target(xml, &block)
@ -203,8 +203,10 @@ module AtomBuilderHelper
end
stream_entry.target.tags.each do |tag|
category xml, tag
category xml, tag.name
end
category(xml, 'nsfw') if stream_entry.target.sensitive?
end
end
end
@ -222,8 +224,10 @@ module AtomBuilderHelper
end
stream_entry.activity.tags.each do |tag|
category xml, tag
category xml, tag.name
end
category(xml, 'nsfw') if stream_entry.activity.sensitive?
end
private