From 1a27d887fa0f9a47054b1df09a54a24f0f56e5da Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 14 Jan 2016 10:38:04 +1100 Subject: [PATCH] FIX: if topic did not save do not attempt to skip inbox --- lib/post_creator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/post_creator.rb b/lib/post_creator.rb index 13e23d22d..30a379c3b 100644 --- a/lib/post_creator.rb +++ b/lib/post_creator.rb @@ -262,7 +262,7 @@ class PostCreator end def ensure_in_allowed_users - return unless @topic.private_message? + return unless @topic.private_message? && @topic.id unless @topic.topic_allowed_users.where(user_id: @user.id).exists? unless @topic.topic_allowed_groups.where('group_id IN (