Commit Graph

3307 Commits (8b893afde7bfac421cd7a37f508db0dde055b7fd)

Author SHA1 Message Date
Eugen Rochko 8b893afde7 Fix removal of status sending the original status to mentioned users instead of delete Salmon (#3672)
* Fix removal of status sending the original status to mentioned users instead
of delete Salmon, add test

* Create remove_status_service_spec.rb
2017-06-11 17:13:43 +02:00
Eugen Rochko 1348d63517 Fix #3665 - Refactor timelines reducer (#3686)
* Move ancestors/descendants out of timelines reducer

* Refactor timelines reducer

All types of timelines now have a flat structure and use the same
reducer functions and actions

* Reintroduce some missing behaviours

* Fix wrong import in reports

* Fix includes typo

* Fix issue related to "next" pagination in timelines and notifications

* Fix bug with timeline's initial state, expandNotifications
2017-06-11 17:07:35 +02:00
René Klačan 042d4c1663 Fix Account model deprecation warnings (#3689)
```
DEPRECATION WARNING: The behavior of `attribute_changed?` inside of after callbacks will be changing in the next version of Rails. The new return value will reflect the behavior of calling the method after `save` returned (e.g. the opposite of what it returns now). To maintain the current behavior, use `saved_change_to_attribute?` instead. (called from block in <class:Account> at /Users/rene/Workspace/personal/ruby/mastodon/app/models/account.rb:60)
DEPRECATION WARNING: The behavior of `attribute_changed?` inside of after callbacks will be changing in the next version of Rails. The new return value will reflect the behavior of calling the method after `save` returned (e.g. the opposite of what it returns now). To maintain the current behavior, use `saved_change_to_attribute?` instead. (called from block in <class:Account> at /Users/rene/Workspace/personal/ruby/mastodon/app/models/account.rb:60)
DEPRECATION WARNING: The behavior of `attribute_changed?` inside of after callbacks will be changing in the next version of Rails. The new return value will reflect the behavior of calling the method after `save` returned (e.g. the opposite of what it returns now). To maintain the current behavior, use `saved_change_to_attribute?` instead. (called from block in <class:Account> at /Users/rene/Workspace/personal/ruby/mastodon/app/models/account.rb:60)
DEPRECATION WARNING: The behavior of `attribute_changed?` inside of after callbacks will be changing in the next version of Rails. The new return value will reflect the behavior of calling the method after `save` returned (e.g. the opposite of what it returns now). To maintain the current behavior, use `saved_change_to_attribute?` instead. (called from block in <class:Account> at /Users/rene/Workspace/personal/ruby/mastodon/app/models/account.rb:61)
DEPRECATION WARNING: The behavior of `attribute_changed?` inside of after callbacks will be changing in the next version of Rails. The new return value will reflect the behavior of calling the method after `save` returned (e.g. the opposite of what it returns now). To maintain the current behavior, use `saved_change_to_attribute?` instead. (called from block in <class:Account> at /Users/rene/Workspace/personal/ruby/mastodon/app/models/account.rb:62)
DEPRECATION WARNING: The behavior of `attribute_changed?` inside of after callbacks will be changing in the next version of Rails. The new return value will reflect the behavior of calling the method after `save` returned (e.g. the opposite of what it returns now). To maintain the current behavior, use `saved_change_to_attribute?` instead. (called from block in <class:Account> at /Users/rene/Workspace/personal/ruby/mastodon/app/models/account.rb:63)
```

Here's PR describing changes to Dirty API https://github.com/rails/rails/pull/25337
2017-06-11 17:01:32 +02:00
Akihiko Odaki (@fn_aki@pawoo.net) 5c54ae381a Localize date in digest and cover NotificationMailer more (#3694)
* Localize date in digest

* Cover NotificationMailer more
2017-06-11 12:04:35 +02:00
Ratmir Karabut 0962301493 Update Russian translation (#3692) 2017-06-11 10:43:01 +02:00
Yamagishi Kazutoshi eb34081815 Remove comments for eslint-disable (#3691) 2017-06-11 10:42:42 +02:00
Yamagishi Kazutoshi d3279a6702 Refactor UpdateRemoteProfileService (#3690) 2017-06-11 10:41:59 +02:00
René Klačan ecdf17a2d7 Make sure email is case insensitive on all places (#3688)
When case insensitivity is enabled via devise's `config.case_insensitive_keys` then `.find_for_authentication` method needs to be used instead of `.find_by` because second mentioned returns `nil` when valid email with different cases is passed.

More info https://github.com/plataformatec/devise/wiki/How-To:-Use-case-insensitive-emails
2017-06-11 02:29:08 +02:00
Matt Jankowski 10c5c41a5c Gem versions, including security-related mail gem update (#3687)
* Update mail to version 2.6.6

* Update aws-sdk to version 2.9.37

* Update capybara to version 2.14.2

* Update oj to version 3.1.0

* Update sidekiq to version 5.0.2

* Update puma to version 3.9.1

* Update sanitize to version 4.5.0

* Update capistrano-rails to version 1.3.0
2017-06-10 20:26:50 +02:00
Jeroen 8309f094df Update NL for 1.4.2 (#3685) 2017-06-10 17:26:01 +02:00
Eugen Rochko b8bc26d60f Improve RTL detection (#3682)
- Use plaintext
- Strip out URLs
- Strip out mentions
- Strip out hashtags
- Strip out whitespace from "overall" count
- Consistent between JS and Ruby
2017-06-10 15:06:50 +02:00
Akihiko Odaki (@fn_aki@pawoo.net) a5729feb11 Improve default language decision and spec (#3351)
* Improve default language decision

This change allows to takes account of accepted language determined by
the user agent even if the custom default locale of the instance is
configured.

* Cover Localized more

* Fix code style
2017-06-10 09:44:02 +02:00
Matt Jankowski e31cd944c2 Move create/destroy actions for api/v1/statuses to namespace (#3678)
Each of mute, favourite, reblog has been updated to:

- Have a separate controller with just a create and destroy action
- Preserve historical route names to not break the API
- Mild refactoring to break up long methods
2017-06-10 09:39:26 +02:00
m4sk1n 8ceff751e2 i18n: Minor fixes in Polish translation (#3674)
* i18n

* i18n

* i18n

* i18n

* i18n
2017-06-09 23:08:09 +02:00
Matt Jankowski dc717cf425 Move reblogged_by and favourited_by actions out of api/v1/statuses and into unique controllers (#3646)
* Add specs for api statuses routes

* Update favourited_by and reblogged_by api routes

* Move methods into new controllers

* Use load_accounts methods to simplify index actions

* Clean up load_accounts methods

* Clean up link header generation

* Check for link headers in specs

* Remove unused actions from api/v1/statuses controller

* Remove specs for moved actions
2017-06-09 14:12:40 -04:00
Eugen Rochko 046307dfea Fix issue with some Node.js versions not having Array.prototype.includes (#3667)
by using Array.prototype.indexOf instead
2017-06-09 19:46:33 +02:00
Eugen Rochko e982b5edac Fix #3658 - Update RTL styles (#3669) 2017-06-09 19:46:25 +02:00
Eugen Rochko 9ea895f05f Correct validators so that existing error messages would look correct (#3668) 2017-06-09 19:46:01 +02:00
m4sk1n caa3d4acbd i18n: updated Polish translation (#3670) 2017-06-09 19:15:55 +02:00
Matt Jankowski b439018342 Language detection defaults to nil (#3666)
* Default to nil for statuses.language

* Language detection defaults to nil instead of instance UI default
2017-06-09 18:09:37 +02:00
Clworld 014c11aa38 adjust the size of 'column-header__back-button' (retry) (#3662) 2017-06-09 16:22:28 +02:00
Yamagishi Kazutoshi 7f99456ab0 Refactor views/admin/reports/show.html.haml (#3656) 2017-06-09 15:08:06 +02:00
Yamagishi Kazutoshi 69dc56b5d0 Add includes to Report#statuses (#3655) 2017-06-09 15:07:02 +02:00
Yamagishi Kazutoshi 0e2b04d920 Check ready state of document in public pages (#3652)
* Check ready state of document in public pages

* add check interactive
2017-06-09 15:06:38 +02:00
ふぁぼ原 2eec65d27f adjust the size of column-header__back-button (#3654) 2017-06-09 15:05:26 +02:00
unarist 6c2359ce87 Add Japanese translation for #3640 (#3650) 2017-06-09 03:14:15 +02:00
Eugen Rochko 67330ceec7 Fix regression from #3592 - validation condition nesting (#3644) 2017-06-08 19:10:48 +02:00
Eugen Rochko cd5c9d67e8 Bump version to 1.4.2 2017-06-08 15:30:43 +02:00
Eugen Rochko 006594e181 Fix db:seed - only run some validations when the field was changed (#3592)
* Fix db:seed - only run some validations when the field was changed

* Add tests
2017-06-08 09:22:01 -04:00
Eugen Rochko 3fc61534fd Fix #3378 - If favourite/reblog already exists, return it instead of failing (#3641) 2017-06-08 15:07:39 +02:00
Eugen Rochko 9eefd60136 Add explit admin actions to (re)subscribe/unsubscribe remote accounts (#3640)
* Add explit admin actions to (re)subscribe/unsubscribe remote accounts
and re-download avatar/header

* Improve how admin NSFW toggle looks
2017-06-08 14:58:22 +02:00
nullkal 9335e15763 Support multiple trusted proxy ip addresses (#3639)
* Support multiple trusted proxy ip addresses

* correct coding style
2017-06-08 14:33:28 +02:00
ThibG 38f03f6da4 Fixes #3605 by returning account from database in case of race condition (#3606) 2017-06-08 13:40:11 +02:00
Yamagishi Kazutoshi 5da41e0cae Improve RuboCop rules (compatibility to Code Climate) (#3636)
08f8de84eb/Gemfile.lock (L38)
Code Climate is using RuboCop v0.46.0.

Change several rules to maintain compatibility.
2017-06-08 13:24:28 +02:00
Yamagishi Kazutoshi 26e4a2cc3c Add Japanese translations (#3635) 2017-06-08 13:23:56 +02:00
m4sk1n 28c83a27f3 i18n: Update Polish translation (#3637) 2017-06-08 13:23:40 +02:00
Sorin Davidoi 4ce6597e3a fix: Warn if JavaScript is disabled (#3634) 2017-06-08 00:52:56 +02:00
Eugen Rochko 2a447b8147 Add rake task to prepare database for foreign keys introduced by #3562 (#3614)
* Add rake task to prepare database for foreign keys introduced by #3562

* Fix typo

* Do not delete OAuth values where NULL values may be permitted

* Fix typo
2017-06-07 20:16:53 +02:00
Matt Jankowski 76f986d07b Clean up for api/base controller (#3629)
* Move ApiController to Api/BaseController

* API controllers inherit from Api::BaseController

* Add coverage for various error cases in api/base controller
2017-06-07 20:09:25 +02:00
jeroenpraat fa04340b99 Rest of 2FA translated + small fix (#3630) 2017-06-07 20:08:34 +02:00
Sorin Davidoi 7300a41678 fix(components/autosuggest_textarea): Race condition regarding onBlur (#3631) 2017-06-07 20:05:53 +02:00
unarist c40e5aea44 Use "match_array" only for order independent assertions (#3626) 2017-06-07 12:59:28 -04:00
Eugen Rochko 2c3de601e6 Fix broken screenshot 2017-06-07 17:53:47 +02:00
Matt Jankowski 9a43a1051a Coverage improvement and concern extraction for rate limit headers in API controller (#3625)
* Coverage for rate limit headers

* Move rate limit headers methods to concern

* Move throttle check to condition on before_action

* Move match_data variable into method

* Move utc timestamp to separate method

* Move header setting into smaller methods

* specs cleanup
2017-06-07 17:23:26 +02:00
Yamagishi Kazutoshi 1844753bda Fix Code Climate failed (regression from #3622) (#3624) 2017-06-07 15:57:59 +02:00
unarist eebfad1ac8 Allow "class" attribute on the "a" tag in sanitization (#3623)
This preserves `<a ... class="u-url mention">` from other Mastodon instances.
2017-06-07 15:57:30 +02:00
ThibG 13340bdc7a Fixes #3388 by moving re-entrant `shared_status_from_xml` before transaction block (#3622)
Steps to reproduce the original issue:
1. Have two remote accounts, A that you don't follow, and B that you follow.
2. Have A post a toot and reply to it.
3. Boost A's reply from remote account B.

This used to cause the local instance to get A's reply but fail to link it to
the original post.
2017-06-07 12:28:16 +02:00
Yamagishi Kazutoshi 270213c858 Small changes to japanese translation (#3620) 2017-06-07 10:15:35 +02:00
STJrInuyasha 8e32541b74 Don't show business e-mail if it's blank (#3619) 2017-06-07 09:57:47 +02:00
Daigo 3 Dango 78a63b4aa9 Update nokogumbo to 1.4.13 (#3617)
$ bundle update --source nokogumbo# Please enter the commit message for your changes. Lines starting

nokogumbo 1.4.11 and 1.4.12 don't work on Heroku.
2017-06-06 20:43:02 +02:00