json.partial! "memos/memo", memo: @memo

json.attachments_list @attachments do |attachment|
  json.partial! "attachments/attachment_simple", locals: {attachment: attachment}
end

json.memo_replies do
  json.array! @memos do |memo|
    json.partial! "memos/replies_list", memo: memo
  end
end

json.author_info do
  json.username @memo.author.full_name
  # TODO watched_by 插件没法用,等把lib文件载入后在打开代码
  json.watched @user.watched?(@memo.author)
  json.image_url url_to_avatar(@memo.author)
  json.identity @memo.author.identity
  json.login @memo.author.login
  json.user_id @memo.author.id
end

json.recommend_shixuns @recommend_shixuns