diff --git a/app/controllers/stream_entries_controller.rb b/app/controllers/stream_entries_controller.rb index da284d80ee0cde84cbaaaf310e0556f2a19c5398..c43d372ed364042436968921cd26903c8741161f 100644 --- a/app/controllers/stream_entries_controller.rb +++ b/app/controllers/stream_entries_controller.rb @@ -43,7 +43,7 @@ class StreamEntriesController < ApplicationController end def set_stream_entry - @stream_entry = @account.stream_entries.find(params[:id]) + @stream_entry = @account.stream_entries.where(activity_type: 'Status').find(params[:id]) @type = @stream_entry.activity_type.downcase raise ActiveRecord::RecordNotFound if @stream_entry.activity.nil? || (@stream_entry.hidden? && (@stream_entry.activity_type != 'Status' || (@stream_entry.activity_type == 'Status' && !@stream_entry.activity.permitted?(current_account)))) diff --git a/app/models/stream_entry.rb b/app/models/stream_entry.rb index 8b41c8c39f56ef15b70023f11ab2f4f40d3d79c8..ae7ae446e9be0a41ac0e66f9454901f8342b3d97 100644 --- a/app/models/stream_entry.rb +++ b/app/models/stream_entry.rb @@ -55,7 +55,7 @@ class StreamEntry < ApplicationRecord end def activity - !new_record? ? send(activity_type.underscore) : super + !new_record? ? send(activity_type.underscore) || super : super end private