about summary refs log tree commit diff
path: root/app/controllers/activitypub/inboxes_controller.rb
diff options
context:
space:
mode:
authorReverite <github@reverite.sh>2019-04-01 13:28:33 -0700
committerReverite <github@reverite.sh>2019-04-01 13:28:33 -0700
commitff736905fa534f7189e57c1d0c14fbac45f239a1 (patch)
tree4502f6d993ba60bd4ab68f41a53a642901d244fd /app/controllers/activitypub/inboxes_controller.rb
parent4d77314005483e53e320a82c87805c6bcca1c463 (diff)
parent3f5acc1ab3bc9c5a6c5805901a393ccd3457b909 (diff)
Merge branch 'glitch' into production
Diffstat (limited to 'app/controllers/activitypub/inboxes_controller.rb')
-rw-r--r--app/controllers/activitypub/inboxes_controller.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/activitypub/inboxes_controller.rb b/app/controllers/activitypub/inboxes_controller.rb
index 1501b914e..a0b7532c2 100644
--- a/app/controllers/activitypub/inboxes_controller.rb
+++ b/app/controllers/activitypub/inboxes_controller.rb
@@ -32,7 +32,10 @@ class ActivityPub::InboxesController < Api::BaseController
   end
 
   def body
-    @body ||= request.body.read.force_encoding('UTF-8')
+    return @body if defined?(@body)
+    @body = request.body.read.force_encoding('UTF-8')
+    request.body.rewind if request.body.respond_to?(:rewind)
+    @body
   end
 
   def upgrade_account