diff options
author | David Yip <yipdw@member.fsf.org> | 2018-04-13 16:36:46 -0500 |
---|---|---|
committer | David Yip <yipdw@member.fsf.org> | 2018-04-13 16:36:46 -0500 |
commit | ed490b781f9347b77eb2305e33ba6dd83f3539b0 (patch) | |
tree | 4f958ce8da072e35ef654cf5ae0a152f613f3ad8 /app/models | |
parent | a817f084eafaf5527445c29ab1d68f42b1a2872f (diff) | |
parent | 50529cbceb84e611bca497624a7a4c38113e5135 (diff) |
Merge remote-tracking branch 'origin/master' into gs-master
Conflicts: Gemfile.lock config/application.rb
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/account.rb | 4 | ||||
-rw-r--r-- | app/models/notification.rb | 2 | ||||
-rw-r--r-- | app/models/status.rb | 2 |
3 files changed, 3 insertions, 5 deletions
diff --git a/app/models/account.rb b/app/models/account.rb index 31f3d5253..13f16e38e 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -246,11 +246,11 @@ class Account < ApplicationRecord end def domains - reorder(nil).pluck('distinct accounts.domain') + reorder(nil).pluck(Arel.sql('distinct accounts.domain')) end def inboxes - urls = reorder(nil).where(protocol: :activitypub).pluck("distinct coalesce(nullif(accounts.shared_inbox_url, ''), accounts.inbox_url)") + urls = reorder(nil).where(protocol: :activitypub).pluck(Arel.sql("distinct coalesce(nullif(accounts.shared_inbox_url, ''), accounts.inbox_url)")) DeliveryFailureTracker.filter(urls) end diff --git a/app/models/notification.rb b/app/models/notification.rb index be9964087..0b0f01aa8 100644 --- a/app/models/notification.rb +++ b/app/models/notification.rb @@ -81,8 +81,6 @@ class Notification < ApplicationRecord end end - private - def activity_types_from_types(types) types.map { |type| TYPE_CLASS_MAP[type.to_sym] }.compact end diff --git a/app/models/status.rb b/app/models/status.rb index 7e5ca09e4..9d66d4b21 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -350,7 +350,7 @@ class Status < ApplicationRecord self.in_reply_to_account_id = carried_over_reply_to_account_id self.conversation_id = thread.conversation_id if conversation_id.nil? elsif conversation_id.nil? - create_conversation + self.conversation = Conversation.new end end |