From 66fd8e782182390df81f1ed46f3a04f3a01d681e Mon Sep 17 00:00:00 2001
From: Evan Minto <evan.minto@gmail.com>
Date: Sat, 22 Apr 2017 20:21:10 -0700
Subject: ActivityPub: Add basic, read-only support for Outboxes, Notes, and
 Create/Announce Activities (#2197)

* Clean up collapsible components

* Expose user Outboxes and AS2 representations of statuses

* Save work thus far.

* Fix bad merge.

* Save my work

* Clean up pagination.

* First test working.

* Add tests.

* Add Forbidden error template.

* Revert yarn.lock changes.

* Fix code style deviations and use localized instead of hardcoded English text.
---
 app/models/status.rb | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'app/models')

diff --git a/app/models/status.rb b/app/models/status.rb
index b75bd0a7b..918a58405 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -140,6 +140,10 @@ class Status < ApplicationRecord
       account.nil? ? filter_timeline_default(query) : filter_timeline_default(filter_timeline(query, account))
     end
 
+    def as_outbox_timeline(account)
+      where(account: account, visibility: :public)
+    end
+
     def favourites_map(status_ids, account_id)
       Favourite.select('status_id').where(status_id: status_ids).where(account_id: account_id).map { |f| [f.status_id, true] }.to_h
     end
-- 
cgit