mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-04 21:01:27 -05:00
bc75010b20
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.
20 lines
554 B
Ruby
20 lines
554 B
Ruby
class SuggestedTopicSerializer < ListableTopicSerializer
|
|
|
|
# need to embed so we have users
|
|
# front page json gets away without embedding
|
|
class SuggestedPosterSerializer < ApplicationSerializer
|
|
attributes :extras, :description
|
|
has_one :user, serializer: BasicUserSerializer, embed: :objects
|
|
end
|
|
|
|
attributes :archetype, :like_count, :views, :category_id
|
|
has_many :posters, serializer: SuggestedPosterSerializer, embed: :objects
|
|
|
|
def include_posters?
|
|
object.private_message?
|
|
end
|
|
|
|
def posters
|
|
object.posters || []
|
|
end
|
|
end
|