about summary refs log tree commit diff
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-08-23 00:03:14 -0500
committermultiple creatures <dev@multiple-creature.party>2019-08-23 00:03:14 -0500
commit8867fee609d2bfee7d1750337f43167de9ef9175 (patch)
tree60612b7001304d82f0790d02acf404e706834ad7
parentb19ab012334ad002718634333bebfddac13013f9 (diff)
raise 404 if no stream entry
-rw-r--r--app/controllers/statuses_controller.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/controllers/statuses_controller.rb b/app/controllers/statuses_controller.rb
index 7af237da4..bb6f0fd8c 100644
--- a/app/controllers/statuses_controller.rb
+++ b/app/controllers/statuses_controller.rb
@@ -190,6 +190,9 @@ class StatusesController < ApplicationController
   def set_status
     @status       = @account.statuses.find(params[:id])
     @stream_entry = @status.stream_entry
+
+    raise ActiveRecord::RecordNotFound if @stream_entry.nil?
+
     @type         = @stream_entry.activity_type.downcase
     @sharekey     = params[:key]