about summary refs log tree commit diff
path: root/app/services/concerns
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-02-11 02:12:05 +0100
committerEugen Rochko <eugen@zeonfederated.com>2017-02-11 02:58:00 +0100
commit149887a0ffc81b588520ff82ab9fda8dff7bce6c (patch)
treefc1ba51d91fbadf729241381a8c46643121ad99f /app/services/concerns
parentd551e43a9bc35b4785285e78f5ecd3157636b447 (diff)
Make follow requests federate
Diffstat (limited to 'app/services/concerns')
-rw-r--r--app/services/concerns/stream_entry_renderer.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/services/concerns/stream_entry_renderer.rb b/app/services/concerns/stream_entry_renderer.rb
new file mode 100644
index 000000000..a4255daea
--- /dev/null
+++ b/app/services/concerns/stream_entry_renderer.rb
@@ -0,0 +1,8 @@
+# frozen_string_literal: true
+
+module StreamEntryRenderer
+  def stream_entry_to_xml(stream_entry)
+    renderer = StreamEntriesController.renderer.new(method: 'get', http_host: Rails.configuration.x.local_domain, https: Rails.configuration.x.use_https)
+    renderer.render(:show, assigns: { stream_entry: stream_entry }, formats: [:atom])
+  end
+end