FIX: if user is logged off return 404 instead of 500

Return correct error when attempting to publish presence for
a logged out user.
This commit is contained in:
Sam 2018-08-21 11:22:40 +10:00
parent 57d04200a1
commit f939bdbf44

View File

@ -107,6 +107,9 @@ after_initialize do
ACTIONS ||= [-"edit", -"reply"].freeze
def publish
raise Discourse::NotFound if !current_user
data = params.permit(
:response_needed,
current: [:action, :topic_id, :post_id],