Commit Graph

767 Commits

Author SHA1 Message Date
ThibG
a20354a20b Set and store report URIs ()
Fixes 
2019-03-17 15:34:56 +01:00
ThibG
5e38ef87a7 Fix reblogs privacy ()
* Fix reblogs privacy

* Fix Announce processing specs
2019-03-17 14:54:09 +01:00
Eugen Rochko
1c113fd72d
Add relationship manager UI () 2019-03-16 11:23:22 +01:00
Eugen Rochko
3ad3223b46
Fix detailed poll validation errors not being returned in the API ()
No more "Owned poll is invalid"
2019-03-15 13:36:38 +01:00
Eugen Rochko
ba84b6d4d7
Add visibility param to reblog REST API ()
Use async worker for creating reblog notification to improve performance
2019-03-15 04:36:41 +01:00
Eugen Rochko
51e154f5e8
Admission-based registrations mode ()
Fix 
Fix 
2019-03-14 05:28:30 +01:00
Eugen Rochko
9e33174604
Refactor User model, extract PamAuthenticable, LdapAuthenticable () 2019-03-14 02:13:42 +01:00
ThibG
65d9004ac9 Add UI for enabling/disabling poll notifications ()
* Add UI for enabling/disabling poll notifications

* Add poll notifications to the (advanced) quick filter bar

* Update poll notification message

“Your poll has ended” → “A poll you have voted in has ended”

* Clear up associated notifications when a poll is deleted
2019-03-13 19:29:54 +01:00
Eugen Rochko
06663fcf87
Fix tagged param not being normalized before querying tags () 2019-03-13 13:02:13 +01:00
Eugen Rochko
9f5b55ad4f
Fix poll update handler calling method was that was not available ()
* Fix poll update handler calling method was that was not available

Fix regression from 

* Refactor VoteService

* Refactor ActivityPub::DistributePollUpdateWorker and optimize it

* Fix typo

* Fix typo
2019-03-12 22:58:59 +01:00
Aurélien Reeves
85537b0069 Squish username before validation ()
* Squish username before validation ()

Fix 

* Move before_validation hook to a private method

Also add Unicode wite-spaces to the spec to support the use of squish
over strip.
2019-03-11 20:48:24 +01:00
ThibG
3a92885a86 Support pushing and receiving updates to poll tallies ()
* Process incoming poll tallies update

* Send Update on poll vote

* Do not send Updates for a poll more often than once every 3 minutes

* Include voters in people to notify of results update

* Schedule closing poll worker on poll creation

* Add new notification type for ending polls

* Add front-end support for ended poll notifications

* Fix UpdatePollSerializer

* Fix Updates not being triggered by local votes

* Fix tests failure

* Fix web push notifications for closing polls

* Minor cleanup

* Notify voters of both remote and local polls when those close

* Fix delivery of poll updates to mentioned accounts and voters
2019-03-11 00:49:31 +01:00
ThibG
3f4a6d44fe Fix setting up fields of a previously suspended account ()
Fix  for real
2019-03-08 19:59:08 +01:00
ThibG
3aaac4f134 Do not allow adding votes to expired polls ()
* Do not allow adding votes to expired polls

* Only validate expires_at on create
2019-03-08 00:54:50 +01:00
Eugen Rochko
054bbb3da2
Immediately display poll results to poll author ()
* Immediately display poll results to poll author

* Refactor Poll#loaded_options and add Poll#voted? to improve DRYness
2019-03-07 22:53:47 +01:00
ThibG
96f905f409 Add optimistic lock to avoid race conditions when handling votes ()
* Add optimistic lock to avoid race conditions when handling votes

* Force-reload polls when getting `ActiveRecord::StaleObjectError`
2019-03-06 19:53:57 +01:00
Eugen Rochko
0c43c320db
Fix status creation API silently discarding invalid poll () 2019-03-05 15:21:31 +01:00
ThibG
d785497ba5 Fix suspended account's fields being set as empty dict instead of list ()
Fixes 
2019-03-05 15:19:54 +01:00
Eugen Rochko
a198add83b
Fix various issues in polls ()
* Fix ActivityPub poll results being serialized even with hide_totals

* Fix poll refresh button having a different font size

* Display poll in OpenGraph description

* Fix NoMethodError when serializing votes

Regression from 

* Fix polls on public pages being broken for non-logged-in users

* Do not show time remaining if poll has no expiration date
2019-03-05 03:51:18 +01:00
Eugen Rochko
5d3e7cee99
Fix featured tag form not failing on failed tag validations () 2019-03-05 03:46:24 +01:00
Eugen Rochko
05dfd632c7
Fix poll options not being stripped of surrounding whitespace on save () 2019-03-05 03:45:56 +01:00
ThibG
833ffce2df Store remote votes URI ()
* Store remote votes URI

* Add spec for accepting remote votes

* Make poll vote id generation work the same way as follows
2019-03-04 22:51:23 +01:00
ThibG
e13d3792f3 Make sure the poll is created before storing its id ()
* Make sure the poll is created before storing its id

* Fix updating poll results

* Support fetching Question activities from the search bar
2019-03-04 00:39:06 +01:00
Eugen Rochko
230a012f00
Add polls ()
* Add polls

Fix 

* Add tests

* Fixes

* Change API for creating polls

* Use name instead of content for votes

* Remove poll validation for remote polls

* Add polls to public pages

* When updating the poll, update options just in case they were changed

* Fix public pages showing both poll and other media
2019-03-03 22:18:23 +01:00
ThibG
99dc212ae5 Fix lists export () 2019-03-03 15:38:47 +01:00
ThibG
9d3c6f1849 Improved remote thread fetching ()
* Fetch up to 5 replies when discovering a new remote status

This is used for resolving threads downwards. The originating
server must add a “replies” attributes with such replies for it to
be useful.

* Add some tests for ActivityPub::FetchRepliesWorker

* Add specs for ActivityPub::FetchRepliesService

* Serialize up to 5 public self-replies for ActivityPub notes

* Add specs for ActivityPub::NoteSerializer

* Move exponential backoff logic to a worker concern

* Fetch first page of paginated collections when fetching thread replies

* Add specs for paginated collections in replies

* Move Note replies serialization to a first CollectionPage

The collection isn't actually paginable yet as it has no id nor
a `next` field. This may come in another PR.

* Use pluck(:uri) instead of map(&:uri) to improve performances

* Fix fetching replies when they are in a CollectionPage
2019-02-28 15:22:21 +01:00
Eugen Rochko
e7f20cc43f
Add type, limit, offset, min_id, max_id, account_id to search API ()
* Add type, limit, offset, min_id, max_id, account_id to search API

Fix 

* Make the offset work on accounts and hashtags search as well

* Assure brakeman we are not doing mass assignment here

* Do not allow paginating unless a type is chosen

* Fix search query and index id field on statuses instead of created_at
2019-02-26 15:21:36 +01:00
Hinaloe
4340d338fd correct opt-out showing application ()
* correct opt-out showing application

refs 

* Revert "correct opt-out showing application"

This reverts commit 0e9bb70f145be42962416a6b87c08d59a2896486.

* User#shows_application? calls wrong value
2019-02-20 17:47:38 +01:00
ThibG
8e7fc7ec73 Fix crash when conversations have no valid participants ()
* Never return empty participants for conversations

Fixes 

* Fix client-side crash when conversations have no participants
2019-02-19 20:00:41 +01:00
ThibG
6840a77711 Add domain search/filter to the "Federation" (/admin/instances) page () 2019-02-18 14:59:19 +01:00
Eugen Rochko
8ef50706a1
Fix relay enabling/disabling not resetting inbox availability status ()
Fix 
2019-02-15 16:08:59 +01:00
rinsuki
c78d64d9c3 Use video filesize limit with gifv () 2019-02-04 04:46:05 +01:00
Eugen Rochko
364f2ff9aa
Add featured hashtags to profiles ()
* Add hashtag filter to profiles

GET /@:username/tagged/:hashtag
GET /api/v1/accounts/:id/statuses?tagged=:hashtag

* Display featured hashtags on public profile

* Use separate model for featured tags

* Update featured hashtag counters on-write

* Limit featured tags to 10
2019-02-04 04:25:59 +01:00
Eugen Rochko
d14c276e58
Add option to overwrite imported data ()
* Add option to overwrite imported data

Fix 

* Add import for domain blocks
2019-02-03 03:59:51 +01:00
ThibG
ed30110618 Make displaying application used to toot opt-in ()
* Make storing and displaying application used to toot opt-in

* Revert to storing application info, and display it to the author via API
2019-02-02 19:18:15 +01:00
ysksn
bcfff65195 Create Redisable#redis ()
* Create Redisable

* Use #redis instead of Redis.current
2019-02-02 19:11:38 +01:00
Acid Chicken (硫酸鶏)
5092d17f29 Add WebP support ()
* Add WebP support

* Remove the changes to the tooltip

refs: https://github.com/tootsuite/mastodon/pull/9879#pullrequestreview-199312528
2019-02-02 12:25:04 +01:00
Eugen Rochko
9519d55332
Fix SSO authentication not working due to missing agreement boolean ()
Fix 
2019-01-25 12:36:54 +01:00
Eugen Rochko
80768e2840
Fix missing account association in tombstone model () 2019-01-18 23:52:09 +01:00
ThibG
75b1488cf4 Add tombstones for remote statuses ()
* Add Tombstone model to remember object deletion

* Do not recreate a status if it has been deleted

* Record Tombstone for remote deleted items

Also, only record deleted items from same-host actors

* Clear an user's tombstones when their key change
2019-01-18 15:56:55 +01:00
Eugen Rochko
31f396b57d
Add support for non-public reblogs from ActivityPub ()
Fix 
2019-01-18 15:56:21 +01:00
Eugen Rochko
69f782b54d
Fix code style of regeneration-related code () 2019-01-18 01:02:51 +01:00
Eugen Rochko
1c6588accc
Redesign admin instances area () 2019-01-08 13:39:49 +01:00
Eugen Rochko
86f27b178c
Fix deleting a scheduled status immediately deleting media attachments () 2019-01-06 16:38:40 +01:00
Eugen Rochko
a49d43d112
Add scheduled statuses ()
Fix 
2019-01-05 12:43:28 +01:00
Naoki Kosaka
fae32634b1 Use Contact User as Relay, Report, Subscribe. ()
* Use Contact User as Relay, Report, Subscribe.

* Use Account.representative to fetch contact user.

* Use find_local.

* No reason to use Account.representative in subscribe_service.

* Don't required representative!

* Fallback is included in Account.representative method.
2019-01-05 07:17:12 +01:00
Eugen Rochko
45899cfa69
Change note length validation to ignore mention domains and URLs ()
Fix 
2019-01-05 07:16:46 +01:00
Eugen Rochko
66436d0895
Improve e-mail digest ()
- Reduce time-to-digest from 20 to 7 days
- Fetch mentions starting from +1 day since last login
- Fix case when last login is more recent than last e-mail
- Do not render all mentions, only 40, but show number in subject
- Do not send digest to moved accounts
- Do send digest to silenced accounts
2019-01-02 10:47:32 +01:00
Eugen Rochko
7fc7437d05
Add CSV export for lists and domain blocks ()
Fix 
Fix 
2019-01-01 13:44:04 +01:00
Eugen Rochko
0f938ff29c
Add handler for Move activity () 2018-12-29 02:24:36 +01:00