Welcome to mirror list, hosted at ThFree Co, Russian Federation.

message_presenter.rb « presenters « app - github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 868cbe9ad84cf3cca3fa897f98ad1a90e61b3357 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# frozen_string_literal: true

class MessagePresenter < BasePresenter
  def as_api_json
    {
      guid:       @presentable.guid,
      created_at: @presentable.created_at,
      body:       @presentable.text,
      author:     PersonPresenter.new(@presentable.author).as_api_json
    }
  end
end