This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
2022-01-19 13:37:27 -08:00
|
|
|
# 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
|
2022-02-09 08:59:43 -08:00
|
|
|
# content_type :string
|
2022-01-19 13:37:27 -08:00
|
|
|
#
|
|
|
|
|
|
|
|
class StatusEdit < ApplicationRecord
|
|
|
|
belongs_to :status
|
|
|
|
belongs_to :account, optional: true
|
|
|
|
|
|
|
|
default_scope { order(id: :asc) }
|
|
|
|
|
|
|
|
delegate :local?, to: :status
|
2022-02-08 16:17:07 -08:00
|
|
|
|
|
|
|
def emojis
|
|
|
|
return @emojis if defined?(@emojis)
|
|
|
|
@emojis = CustomEmoji.from_text([spoiler_text, text].join(' '), status.account.domain)
|
|
|
|
end
|
2022-01-19 13:37:27 -08:00
|
|
|
end
|