mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: keep unique post checks separate for PMs vs topics (#17272)
This allows for people to use PMs for drafting and then post them on topics. Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
This commit is contained in:
@@ -248,7 +248,7 @@ class Post < ActiveRecord::Base
|
||||
|
||||
# The key we use in redis to ensure unique posts
|
||||
def unique_post_key
|
||||
"unique-post-#{user_id}:#{raw_hash}"
|
||||
"unique#{topic&.private_message? ? "-pm" : ""}-post-#{user_id}:#{raw_hash}"
|
||||
end
|
||||
|
||||
def store_unique_post_key
|
||||
|
||||
Reference in New Issue
Block a user