0
0
Fork 0

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:
Effy Elden 2017-01-15 08:58:50 +11:00
parent f63f0c4625
commit d6bc0e8db4
13 changed files with 38 additions and 6 deletions

View file

@ -0,0 +1,8 @@
module ApplicationExtension
extend ActiveSupport::Concern
included do
validates :website
end
end
Doorkeeper::Application.send :include, ApplicationExtension

View file

@ -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'