Commit graph

19 commits

Author SHA1 Message Date
Eugen Rochko
de5305a3a5
Fix redirecting non-functional accounts on public pages ()
Fix 
2019-09-28 01:33:27 +02:00
ThibG
5f63339744 Fix more ActivityPub queries setting cookies and preventing caching () 2019-08-12 22:26:07 +02:00
Eugen Rochko
5bf67ca913
Add ActivityPub secure mode ()
* Add HTTP signature requirement for served ActivityPub resources

* Change `SECURE_MODE` to `AUTHORIZED_FETCH`

* Add 'Signature' to 'Vary' header and improve code style

* Improve code style by adding `public_fetch_mode?` method
2019-07-11 20:11:09 +02:00
Eugen Rochko
63c7fe8e48
Refactor controllers for statuses, accounts, and more () 2019-07-08 12:03:45 +02:00
ThibG
cac9110533 Cleanup various controllers ()
* Remove skip_session! as it is not supported in Rails 5

* Minor cleanup in StreamEntriesController

* Remove redundant mark_cacheable! calls
2019-06-05 14:02:59 +02:00
ThibG
cc6e3c3900 Cache featured collections, as well as outbox, followers and following () 2019-04-04 01:30:44 +02:00
Ben Lubar
c3d1594576 Reduce server load caused by anonymous viewing. ()
Do not start a session if the current user is not logged in for public-facing pages.

Mark pages that don't care about sessions as publicly cacheable.

Keep the max age as 0 so proxies and browsers will still try to retrieve an updated version but can still fall back to the stale version if the site is down or too slow.

Fixes .
2019-03-17 15:39:25 +01:00
Eugen Rochko
1e02dc8715
Add preference to hide following/followers lists ()
* Add preference to hide following/followers lists

- Public pages
- ActivityPub collections (does not return pages but does give total)
- REST API (unless it's your own) (does not federate)

Fix 

* Add preference

* Add delegation

* Fix issue

* Fix issue
2018-05-18 02:26:51 +02:00
ThibG
d1aef17f9a Do not render first page of following and followers collections unless explicitly asked to () 2018-05-04 20:17:01 +02:00
Eugen Rochko
18513a978a
Improve public account cards ()
- Add follow/unfollow/remote follow buttons
- Format the bio properly
- Always show username@domain, even for local accounts
2018-02-26 16:18:41 +01:00
Eugen Rochko
3a3475450e Encode custom emojis as resolveable objects in ActivityPub ()
* Encode custom emojis as resolveable objects in ActivityPub

* Improve code style
2017-10-07 17:43:42 +02:00
nullkal
7d16bb379d Use OrderedCollectionPage to return followers/following list () 2017-09-19 16:37:06 +02:00
Eugen Rochko
6df8bd277b Set correct content-type for ActivityPub JSON () 2017-08-14 04:16:43 +02:00
Eugen Rochko
a6328fc1b1 Minor ActivityPub JSON fixes ()
- Objects must have attributedTo instead of actor
- The current attribute belongs to CollectionPage, not Collection
2017-07-16 10:28:55 +02:00
Eugen Rochko
8c45cd0e36 Improve ActivityPub representations ()
* Improve webfinger templates and make tests more flexible

* Clean up AS2 representation of actor

* Refactor outbox

* Create activities representation

* Add representations of followers/following collections, do not redirect /users/:username route if format is empty

* Remove unused translations

* ActivityPub endpoint for single statuses, add ActivityPub::TagManager for better
URL/URI generation

* Add ActivityPub::TagManager#to

* Represent all attachments as Document instead of Image/Video specifically
(Because for remote ones we may not know for sure)

Add mentions and hashtags representation to AP notes

* Add AP-resolvable hashtag URIs

* Use ActiveModelSerializers for ActivityPub

* Clean up unused translations

* Separate route for object and activity

* Adjust cc/to matrices

* Add to/cc to activities, ensure announce activity embeds target status and
not the wrapper status, add "id" to all collections
2017-07-15 03:01:39 +02:00
Akihiko Odaki
bf575a1f5e Introduce recent to Follow ()
Introduce recent to Follow, as Account and other models have.
This change also adds specs for the scope and the dependents.
2017-05-23 13:12:19 +02:00
alpaca-tc
ddc34feb58 Optimize follower_accounts and following_accounts () 2017-05-06 04:03:07 +02:00
alpaca-tc
7d36a76180 Remove uneeded ORDER BY query () 2017-04-29 10:50:10 +02:00
Matt Jankowski
8bac0350d1 Restful refactor of accounts/ routes ()
* Add routing specs for accounts followers and following actions

* Use more restful route naming for public account follow pages

Moves two actions:
- accounts#followers to accounts/follower_accounts#index
- accounts#following to accounts/following_accounts#index

Adds routing spec to ensure prior URLs are preserved.
2017-04-19 13:52:37 +02:00