about summary refs log tree commit diff
path: root/app/helpers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-11-05 15:20:05 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-11-05 17:13:14 +0100
commit48b9619439818ecb344ae33c9c31a55ecb1aa27a (patch)
treeef350e3ebf2563adbe4d57778a08f561d912415f /app/helpers
parent62292797eccc5bcf47abae9f4daaa2c186660644 (diff)
Adding hashtags
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/atom_builder_helper.rb12
-rw-r--r--app/helpers/tags_helper.rb2
2 files changed, 14 insertions, 0 deletions
diff --git a/app/helpers/atom_builder_helper.rb b/app/helpers/atom_builder_helper.rb
index c7131074d..2eed2da65 100644
--- a/app/helpers/atom_builder_helper.rb
+++ b/app/helpers/atom_builder_helper.rb
@@ -47,6 +47,10 @@ module AtomBuilderHelper
     xml.author(&block)
   end
 
+  def category(xml, tag)
+    xml.category(term: tag.name)
+  end
+
   def target(xml, &block)
     xml['activity'].object(&block)
   end
@@ -186,6 +190,10 @@ module AtomBuilderHelper
           stream_entry.target.media_attachments.each do |media|
             link_enclosure xml, media
           end
+
+          stream_entry.target.tags.each do |tag|
+            category xml, tag
+          end
         end
       end
     end
@@ -198,6 +206,10 @@ module AtomBuilderHelper
       stream_entry.activity.media_attachments.each do |media|
         link_enclosure xml, media
       end
+
+      stream_entry.activity.tags.each do |tag|
+        category xml, tag
+      end
     end
   end
 
diff --git a/app/helpers/tags_helper.rb b/app/helpers/tags_helper.rb
new file mode 100644
index 000000000..23450bc5c
--- /dev/null
+++ b/app/helpers/tags_helper.rb
@@ -0,0 +1,2 @@
+module TagsHelper
+end