Commit Graph

3457 Commits (7362469d8956d5f972283aadd4157631aa66b085)
 

Author SHA1 Message Date
Eugen Rochko ce812466c7 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
8 years ago
Eugen Rochko 47bf7a8047 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
8 years ago
René Klačan 85d405c810 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
8 years ago
Akihiko Odaki (@fn_aki@pawoo.net) f596a413ef Localize date in digest and cover NotificationMailer more (#3694)
* Localize date in digest

* Cover NotificationMailer more
8 years ago
Ratmir Karabut 9e53fe5c29 Update Russian translation (#3692) 8 years ago
Yamagishi Kazutoshi 3690f04e4a Remove comments for eslint-disable (#3691) 8 years ago
Yamagishi Kazutoshi f3e8bc9f8f Refactor UpdateRemoteProfileService (#3690) 8 years ago
René Klačan dcf0530218 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
8 years ago
Matt Jankowski 47338bc13d 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
8 years ago
Jeroen 6fb9726b99 Update NL for 1.4.2 (#3685) 8 years ago
Eugen Rochko 8015fd7600 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
8 years ago
Akihiko Odaki (@fn_aki@pawoo.net) 4919b89ab8 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
8 years ago
Matt Jankowski 2925372ff4 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
8 years ago
m4sk1n 778430b54a i18n: Minor fixes in Polish translation (#3674)
* i18n

* i18n

* i18n

* i18n

* i18n
8 years ago
Matt Jankowski 5282ba862a 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
8 years ago
Eugen Rochko 0464602978 Fix issue with some Node.js versions not having Array.prototype.includes (#3667)
by using Array.prototype.indexOf instead
8 years ago
Eugen Rochko 9b03cf0ddd Fix #3658 - Update RTL styles (#3669) 8 years ago
Eugen Rochko cdff1da901 Correct validators so that existing error messages would look correct (#3668) 8 years ago
m4sk1n 1a065fb146 i18n: updated Polish translation (#3670) 8 years ago
Matt Jankowski 022008a2a6 Language detection defaults to nil (#3666)
* Default to nil for statuses.language

* Language detection defaults to nil instead of instance UI default
8 years ago
Clworld a3715598cc adjust the size of 'column-header__back-button' (retry) (#3662) 8 years ago
Yamagishi Kazutoshi 1be48dd805 Refactor views/admin/reports/show.html.haml (#3656) 8 years ago
Yamagishi Kazutoshi 6384041d17 Add includes to Report#statuses (#3655) 8 years ago
Yamagishi Kazutoshi 140e73bc82 Check ready state of document in public pages (#3652)
* Check ready state of document in public pages

* add check interactive
8 years ago
ふぁぼ原 e3fae6f52c adjust the size of column-header__back-button (#3654) 8 years ago
unarist 65d8c73bae Add Japanese translation for #3640 (#3650) 8 years ago
Eugen Rochko 177dd8bb53 Fix regression from #3592 - validation condition nesting (#3644) 8 years ago
Eugen Rochko 380b20eed6 Bump version to 1.4.2 8 years ago
Eugen Rochko c207b4bb33 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
8 years ago
Eugen Rochko b87eb8ea14 Fix #3378 - If favourite/reblog already exists, return it instead of failing (#3641) 8 years ago
Eugen Rochko 8902e265b4 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
8 years ago
nullkal b8ea28d6d0 Support multiple trusted proxy ip addresses (#3639)
* Support multiple trusted proxy ip addresses

* correct coding style
8 years ago
ThibG f741673638 Fixes #3605 by returning account from database in case of race condition (#3606) 8 years ago
Yamagishi Kazutoshi 0a0b9a271a 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.
8 years ago
Yamagishi Kazutoshi 7d2b4186c3 Add Japanese translations (#3635) 8 years ago
m4sk1n 90689190a3 i18n: Update Polish translation (#3637) 8 years ago
Sorin Davidoi 8acadeea76 fix: Warn if JavaScript is disabled (#3634) 8 years ago
Eugen Rochko 75c6513c67 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
8 years ago
Matt Jankowski 73540ffe6b 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
8 years ago
jeroenpraat 92bb166246 Rest of 2FA translated + small fix (#3630) 8 years ago
Sorin Davidoi 8cf8ce4ac0 fix(components/autosuggest_textarea): Race condition regarding onBlur (#3631) 8 years ago
unarist 0f1b1d78b1 Use "match_array" only for order independent assertions (#3626) 8 years ago
Eugen Rochko d3bbef27e7 Fix broken screenshot 8 years ago
Matt Jankowski f0634ba876 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
8 years ago
Yamagishi Kazutoshi 1d68fe1a60 Fix Code Climate failed (regression from #3622) (#3624) 8 years ago
unarist 6bd6dcf6df Allow "class" attribute on the "a" tag in sanitization (#3623)
This preserves `<a ... class="u-url mention">` from other Mastodon instances.
8 years ago
ThibG 28d2920472 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.
8 years ago
Yamagishi Kazutoshi 34bfea8bbf Small changes to japanese translation (#3620) 8 years ago
STJrInuyasha 2d91944285 Don't show business e-mail if it's blank (#3619) 8 years ago
Daigo 3 Dango 0026ba2751 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.
8 years ago