end
def content(xml, content)
- xml.content({ type: 'html' }, content)
+ xml.content({ type: 'html' }, content) unless content.blank?
end
def title(xml, title)
end
def summary(xml, summary)
- xml.summary summary
+ xml.summary(summary) unless summary.blank?
end
def subtitle(xml, subtitle)
- xml.subtitle subtitle
+ xml.subtitle(subtitle) unless subtitle.blank?
end
def link_alternate(xml, url)
def portable_contact(xml, account)
xml['poco'].preferredUsername account.username
- xml['poco'].displayName account.display_name
- xml['poco'].note account.note
+ xml['poco'].displayName(account.display_name) unless account.display_name.blank?
+ xml['poco'].note(account.note) unless account.note.blank?
end
def in_reply_to(xml, uri, url)
activity.content
end
elsif activity.nil?
- ''
+ nil
else
activity.content
end
content xml, conditionally_formatted(stream_entry.activity)
verb xml, stream_entry.verb
link_self xml, account_stream_entry_url(stream_entry.account, stream_entry, format: 'atom')
- object_type xml, stream_entry.object_type
# Comments need thread element
if stream_entry.threaded?
end
end
end
+ else
+ object_type xml, stream_entry.object_type
end
stream_entry.mentions.each do |mentioned|