mirror of
https://github.com/mastodon/mastodon.git
synced 2024-08-20 21:08:15 -07:00
fd3a45e348
* Add edit history to web UI * Change history reducer to store items per status * Fix missing loading prop
28 lines
896 B
Ruby
28 lines
896 B
Ruby
# frozen_string_literal: true
|
|
# == Schema Information
|
|
#
|
|
# Table name: status_edits
|
|
#
|
|
# id :bigint(8) not null, primary key
|
|
# status_id :bigint(8) not null
|
|
# account_id :bigint(8)
|
|
# text :text default(""), not null
|
|
# spoiler_text :text default(""), not null
|
|
# media_attachments_changed :boolean default(FALSE), not null
|
|
# created_at :datetime not null
|
|
# updated_at :datetime not null
|
|
#
|
|
|
|
class StatusEdit < ApplicationRecord
|
|
belongs_to :status
|
|
belongs_to :account, optional: true
|
|
|
|
default_scope { order(id: :asc) }
|
|
|
|
delegate :local?, to: :status
|
|
|
|
def emojis
|
|
return @emojis if defined?(@emojis)
|
|
@emojis = CustomEmoji.from_text([spoiler_text, text].join(' '), status.account.domain)
|
|
end
|
|
end
|