DEV: :post_created event always receives a post.

DEV: :post_created event always receives a post.

diff --git a/plugin.rb b/plugin.rb
index 94b16e9..697b494 100644
--- a/plugin.rb
+++ b/plugin.rb
@@ -209,7 +209,7 @@ after_initialize do
 
   # Delete TopicAllowedUser records for users who do not have the key.
   on(:post_created) do |post, opts, user|
-    if post&.topic&.is_encrypted? && !DiscourseEncrypt::Store.get("key_#{post.topic_id}_#{user.id}").present?
+    if post.topic&.is_encrypted? && !DiscourseEncrypt::Store.get("key_#{post.topic_id}_#{user.id}").present?
       TopicAllowedUser.find_by(user_id: user.id, topic_id: post.topic_id).delete
     end
   end

GitHub sha: f8158975