Commit Graph

14 Commits (6077eca240d3dc8765380c99896d85ab6e9c4ea9)

Author SHA1 Message Date
ThibG cc6e3c3900 Cache featured collections, as well as outbox, followers and following ()
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 .
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
ThibG d1aef17f9a Do not render first page of following and followers collections unless explicitly asked to ()
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
Eugen Rochko 3a3475450e Encode custom emojis as resolveable objects in ActivityPub ()
* Encode custom emojis as resolveable objects in ActivityPub

* Improve code style
nullkal 7d16bb379d Use OrderedCollectionPage to return followers/following list ()
Eugen Rochko 6df8bd277b Set correct content-type for ActivityPub JSON ()
Eugen Rochko a6328fc1b1 Minor ActivityPub JSON fixes ()
- Objects must have attributedTo instead of actor
- The current attribute belongs to CollectionPage, not Collection
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
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.
alpaca-tc ddc34feb58 Optimize follower_accounts and following_accounts ()
alpaca-tc 7d36a76180 Remove uneeded `ORDER BY` query ()
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.