mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 13:41:16 +08:00
FEATURE: suggested messages for messages
FEATURE: clicking envelope takes you to inbox Suggested messages works somewhat like suggested topics. - New show up first (in either group inbox or inbox) - Then unread (in either group inbox or inbox) - Finally "related" which are messages with same participants as the current pm.
This commit is contained in:
@ -38,7 +38,14 @@ module Helpers
|
||||
args[:topic_id] = args[:topic].id if args[:topic]
|
||||
user = args.delete(:user) || Fabricate(:user)
|
||||
args[:category] = args[:category].name if args[:category].is_a?(Category)
|
||||
PostCreator.create(user, args)
|
||||
creator = PostCreator.new(user, args)
|
||||
post = creator.create
|
||||
|
||||
if creator.errors.present?
|
||||
raise StandardError.new(creator.errors.full_messages.join(" "))
|
||||
end
|
||||
|
||||
post
|
||||
end
|
||||
|
||||
def generate_username(length=10)
|
||||
|
Reference in New Issue
Block a user