mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Don't show suggested messages if private messages are disabled
This commit is contained in:
@@ -100,7 +100,11 @@ class TopicQuery
|
||||
|
||||
# Return a list of suggested topics for a topic
|
||||
def list_suggested_for(topic)
|
||||
return if topic.private_message? && !@user
|
||||
|
||||
# Don't suggest messages unless we have a user, and private messages are
|
||||
# enabled.
|
||||
return if topic.private_message? &&
|
||||
(@user.blank? || !SiteSetting.enable_private_messages?)
|
||||
|
||||
builder = SuggestedTopicsBuilder.new(topic)
|
||||
|
||||
|
Reference in New Issue
Block a user