Add tracking of OAuth app that posted a status, extend OAuth apps to have optional website field, add application details to API, show application name and website on detailed status views. Resolves #11
This commit is contained in:
parent
f63f0c4625
commit
d6bc0e8db4
13 changed files with 38 additions and 6 deletions
8
app/models/concerns/application.rb
Normal file
8
app/models/concerns/application.rb
Normal file
|
@ -0,0 +1,8 @@
|
|||
module ApplicationExtension
|
||||
extend ActiveSupport::Concern
|
||||
included do
|
||||
validates :website
|
||||
end
|
||||
end
|
||||
|
||||
Doorkeeper::Application.send :include, ApplicationExtension
|
|
@ -7,6 +7,8 @@ class Status < ApplicationRecord
|
|||
|
||||
enum visibility: [:public, :unlisted, :private], _suffix: :visibility
|
||||
|
||||
belongs_to :application, class_name: 'Doorkeeper::Application'
|
||||
|
||||
belongs_to :account, inverse_of: :statuses
|
||||
belongs_to :in_reply_to_account, foreign_key: 'in_reply_to_account_id', class_name: 'Account'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue