Commit graph

119 commits

Author SHA1 Message Date
Eugen Rochko
273e8f0474 Add remote interaction dialog for toots ()
* Add remote interaction dialog for toots

* Change AuthorizeFollow into AuthorizeInteraction, support statuses

* Update brakeman.ignore

* Adjust how interaction buttons are display on public pages

* Fix tests
2018-08-18 03:03:12 +02:00
Eugen Rochko
bf5acc3eae Move status counters to separate table, count replies ()
* Move status counters to separate table, count replies

* Migration to remove old counter columns from statuses table

* Fix schema file
2018-08-14 19:19:32 +02:00
Eugen Rochko
6e3cb11f3c Public profile endorsements (accounts picked by profile owner) () 2018-08-09 09:56:53 +02:00
Eugen Rochko
e90b9a0b05 Display Mastodon version in footer of web UI ()
Fix 
2018-07-14 03:56:34 +02:00
Eugen Rochko
171c20ce72 Add federation relay support ()
* Add federation relay support

* Add admin UI for managing relays

* Include actor on relay-related activities

* Fix i18n
2018-07-13 02:16:06 +02:00
ThibG
4c70bb6d6d Add option to not consider word boundaries when processing keyword filtering ()
* Add option to not consider word boundaries when filtering phrases

* Add a few tests for keyword/phrase filtering
2018-07-09 02:22:09 +02:00
Eugen Rochko
0dbaa1badf Fix missing irreversible in filters API, expires_in param () 2018-07-07 18:51:45 +02:00
Eugen Rochko
d878e3e945 Keyword/phrase filtering ()
* Add keyword filtering

    GET|POST       /api/v1/filters
    GET|PUT|DELETE /api/v1/filters/:id

- Irreversible filters can drop toots from home or notifications
- Other filters can hide toots through the client app
- Filters use a phrase valid in particular contexts, expiration

* Make sure expired filters don't get applied client-side

* Add missing API methods

* Remove "regex filter" from column settings

* Add tests

* Add test for FeedManager

* Add CustomFilter test

* Add UI for managing filters

* Add streaming API event to allow syncing filters

* Fix tests
2018-06-29 15:34:36 +02:00
Eugen Rochko
549d2f3d42 Always send content for backwards-compatibility () 2018-06-18 23:58:13 +02:00
Eugen Rochko
1efdd31c68 Serialize language into ActivityPub JSON ()
* Serialize language into ActivityPub JSON

* Only use contentMap if language is present
2018-06-18 22:43:01 +02:00
Eugen Rochko
f91fa10804 Allow selecting default posting language instead of auto-detect ()
* Allow selecting default posting language instead of auto-detect

* Enable default language setting in credentials API

* Fix form saving
2018-06-17 18:57:31 +02:00
Eugen Rochko
9bcd509165 Do not pre-emojify note HTML in accounts REST API ()
Fix 
2018-06-16 18:47:19 +02:00
Eugen Rochko
a21c8a2e0e Add "find friends", "invite people", and more to getting started footer ()
- Find friends from Twitter (bridge)
- Invite people (when invites enabled)
- Security (change e-mail/password)
- Developers (create OAuth apps/tokens)
2018-06-15 15:51:37 +02:00
Eugen Rochko
744d47dee2 Add GET /api/v2/search which returns rich tag objects, adjust web UI () 2018-05-29 02:01:24 +02:00
Eugen Rochko
8a3b9d26fb Track trending tags ()
* Track trending tags

- Half-life of 1 day
- Historical usage in daily buckets (last 7 days stored)
- GET /api/v1/trends

Fix 

* Add trends to web UI

* Don't render compose form on search route, adjust search results header

* Disqualify tag from trends if it's in disallowed hashtags setting

* Count distinct accounts using tag, ignore silenced accounts
2018-05-27 21:45:30 +02:00
Eugen Rochko
2d34552fbc Do not encode HTML entities in initial Web Push payload body () 2018-05-22 18:12:45 +02:00
Eugen Rochko
70e678da43 Improve payload format of Web Push API now that it's open ()
> Good lord what is happening in there

Previously the contents of the Web Push API payloads closely resembled the structure of JavaScript's [Notification](https://developer.mozilla.org/en-US/docs/Web/API/Notification). But now that the API is open to non-browser apps, and given that there is no required coupling between contents of the payload and a Notification object, here is how I changed the payload:

```json
{ 
  "access_token": "...",
  "preferred_locale": "en",
  "notification_id": "12345",
  "notification_type": "follow",
  "title": "So and so followed you",
  "body": "This is my bio",
  "icon": "https://example.com/avatar.png"
}
```

The title, body and icon attributes are included as a fallback so you can construct a minimal notification if you cannot perform a network request to the API to get more data.
2018-05-19 14:46:47 +02:00
Eugen Rochko
e86a4fe36b Add REST API for Web Push Notifications subscriptions ()
- POST /api/v1/push/subscription
- PUT /api/v1/push/subscription
- DELETE /api/v1/push/subscription
- New OAuth scope: "push" (required for the above methods)
2018-05-11 11:49:12 +02:00
Eugen Rochko
7ff3c849d1 Bot nameplates ()
* Store actor type in database

* Add bot nameplate to web UI, add setting to preferences, API, AP
Fix 

* Fix code style issues
2018-05-07 09:31:07 +02:00
Eugen Rochko
4055ce490c Enable custom emojis in profiles (notes, field values, display names) ()
Follow-up to 
2018-05-06 11:48:51 +02:00
Eugen Rochko
2ee5d518f1 Fallback to old on-the-fly URI for follows/blocks if no stored URI ()
Fix 
2018-05-05 23:07:51 +02:00
Eugen Rochko
154076e8e7 Store URIs of follows, follow requests and blocks for ActivityPub ()
Same URI passed between follow request and follow, since they are
the same thing in ActivityPub. Local URIs are generated during
creation using UUIDs and are passed to serializers.
2018-05-04 21:14:34 +02:00
Eugen Rochko
93b8db8f08 Better pagination for ActivityPub outbox () 2018-05-04 19:19:11 +02:00
Eugen Rochko
4258e304c5 Allow updating bio fields via PUT /api/v1/accounts/update_credentials ()
Add raw bio fields to the source attribute on GET /api/v1/accounts/verify_credentials
2018-05-02 15:57:37 +02:00
Eugen Rochko
24330e4fa7 Add RSS feeds for end-users ()
* Add RSS feed for accounts

* Add RSS feeds for hashtags

* Fix code style issues

* Fix code style issues
2018-04-25 02:10:02 +02:00
Eugen Rochko
466442b764 Add bio fields ()
* Add bio fields

- Fix 
- Fix 
- Fix 

* Display bio fields in web UI

* Fix output of links and missing fields

* Federate bio fields over ActivityPub as PropertyValue

* Improve how the fields are stored, add to Edit profile form

* Add rel=me to links in fields

Fix 
2018-04-14 12:41:08 +02:00
Isatis
f3db0d6ecc retrieve custom emoji list via API instead of before page load () 2018-04-04 22:25:34 +02:00
David Underwood
44274257de [WIP] Enable custom emoji on account pages and in the sidebar ()
Federate custom emojis with accounts
2018-04-01 23:55:42 +02:00
Eugen Rochko
6383580e6f Do not re-query mentions from serializers ()
Fix performance regression from 
2018-03-22 11:31:17 +01:00
ThibG
99790407e2 Serialize mentions in the order they are added ()
Up until now, the order seemed to be in the *opposite* order,
which caused the WebUI to populate mentions in reversed order
when replying to toots local to one's instance.
2018-03-19 20:19:35 +01:00
Eugen Rochko
8e25857cb9 Fix wrong target URIs in ActivityPub Add/Remove () 2018-03-07 05:58:24 +01:00
Eugen Rochko
29f412da2c Fix - Use target instead of origin in Remove activity () 2018-03-07 03:54:46 +01:00
Akihiko Odaki
0016fd40e7 Do not fetch environment variables to determine default locale ()
The default locale is now set by config.
2018-03-04 10:00:46 +01:00
Eugen Rochko
b1f8dfd3cf Federate pinned statuses over ActivityPub ()
* Federate pinned statuses over ActivityPub

* Display pinned toots in web UI

Fix 

* Fix migration

* Fix tests

* Update outbox_serializer.rb

* Update remove_serializer.rb

* Update add_serializer.rb

* Update fetch_featured_collection_service.rb
2018-03-04 09:19:11 +01:00
Eugen Rochko
359e441fb2 Fix missing focalPoint in ActivityPub JSON () 2018-03-04 07:21:41 +01:00
Eugen Rochko
a91ef56e80 When search enabled, display hint in search popout ()
* When advanced search is enabled, show different hint in search popout

* Change "getting started" icon in tabs bar from asterisk to hamburger
2018-03-02 06:02:42 +01:00
Eugen Rochko
c421ad685d Add contact_account and languages to instance API () 2018-03-01 20:48:11 +01:00
Eugen Rochko
0ebd2a1718 Federated reports ()
* Fix : Federated reports

* UI for federated reports

* Add spec for ActivityPub Flag handler

* Add spec for ReportService
2018-02-28 06:54:55 +01:00
Eugen Rochko
692dfd9a93 Fix nil error in focal_point? () 2018-02-22 17:42:33 +01:00
beatrix
9184d588c1 fix typo in image serializer ()
respond to!
2018-02-22 02:47:17 +01:00
Eugen Rochko
865c7e7178 Focal points ()
* Add focus param to media API, center thumbnails on focus point

* Add UI for setting a focal point

* Improve focal point icon on upload item

* Use focal point in upload preview

* Add focalPoint property to ActivityPub

* Don't show focal point button for non-image attachments
2018-02-22 00:35:46 +01:00
Eugen Rochko
f6884555d7 Account archive download ()
* Fix : Account archive download

* Export actor and private key in the archive

* Optimize BackupService

- Add conversation to cached associations of status, because
  somehow it was forgotten and is source of N+1 queries
- Explicitly call GC between batches of records being fetched
  (Model class allocations are the worst offender)
- Stream media files into the tar in 1MB chunks
  (Do not allocate media file (up to 8MB) as string into memory)
- Use #bytesize instead of #size to calculate file size for JSON
  (Fix FileOverflow error)
- Segment media into subfolders by status ID because apparently
  GIF-to-MP4 media are all named "media.mp4" for some reason

* Keep uniquely generated filename in Paperclip::GifTranscoder

* Ensure dumped files do not overwrite each other by maintaing directory partitions

* Give tar archives a good name

* Add scheduler to remove week-old backups

* Fix code style issue
2018-02-21 23:21:32 +01:00
Eugen Rochko
219b28e172 Add preference to always display sensitive media () 2018-02-09 00:26:57 +01:00
りんすき
1827d142ee implement web share target ()
* web share target

* fix

* fix
2018-01-17 17:08:10 +01:00
Eugen Rochko
c8f0be1d6d Revert () 2018-01-08 10:57:52 +01:00
Yamagishi Kazutoshi
f92399cfe7 Fallback default thumbnail in instance status API () 2018-01-04 15:36:55 +01:00
Eugen Rochko
c647ce902b Send one Delete of Actor in ActivityPub when account is suspended () 2018-01-04 14:40:49 +01:00
Akihiko Odaki
7a0479c830 Allow to dereference Follow object for ActivityPub ()
* Allow to dereference Follow object for ActivityPub

* Accept IRI as object representation for Accept activity
2018-01-03 18:08:57 +01:00
Eugen Rochko
ef8fc3542b Fix - Prevent nested migrated accounts, or migrations to self () 2017-12-14 21:35:30 +01:00
Akihiko Odaki
ce3989fc6a Add embed_url to preview cards () 2017-12-07 03:37:43 +01:00