Commit Graph

3464 Commits

Author SHA1 Message Date
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
2017-06-07 17:23:26 +02:00
Yamagishi Kazutoshi
1d68fe1a60 Fix Code Climate failed (regression from #3622) (#3624) 2017-06-07 15:57:59 +02:00
unarist
6bd6dcf6df 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
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.
2017-06-07 12:28:16 +02:00
Yamagishi Kazutoshi
34bfea8bbf Small changes to japanese translation (#3620) 2017-06-07 10:15:35 +02:00
STJrInuyasha
2d91944285 Don't show business e-mail if it's blank (#3619) 2017-06-07 09:57:47 +02:00
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.
2017-06-06 20:43:02 +02:00
Eugen Rochko
b623dd12c1 Use preview image in <ImageLoader /> to provide immediate visual feedback (#3595)
before the full-size image is loaded
2017-06-06 19:30:17 +02:00
Eugen Rochko
722d152082 Fix #3063 - Add dynamic app manifest (#3563)
* Fix #3063 - Add dynamic app manifest

* Added short_name

* Add background_color
2017-06-06 19:29:42 +02:00
ふぁぼ原
7623766241 Add regex filters on the community timeline and the public timeline. (#3564)
* Add regex filter on the community timeline and the public timeline

* correcting

* Adjust the height of header buttons

* Remove trailing spaces

* Remove trailing spaces

* Solve some code duplication

* reset the state of the locale files in app/javascript/mastodon/locales

* adjust to upstream

* adjust to upstream

* change keys of locale settings
2017-06-06 16:56:10 +02:00
unarist
e34c5a3503 Fix 500 errors on searching invalid URLs (#3613) 2017-06-06 16:44:48 +02:00
unarist
004672aa6c Fix tag search order and not to use tsvector (#3611)
* Sort results by the name
* Switch search method to simple `LIKE` matching instead of tsvector/tsquery

Previously we used scores from ts_rank_cd() to sort results, but it didn't work
because the function returns same score for all results. It's not for calculate
similarity of single words. Sometimes this bug even push out exact matching tag
from results.

Additionally, PostgreSQL supports prefix searching with standard btree index.
Using it offers simpler code, but also less index size and some speed.
2017-06-06 16:07:06 +02:00
Yamagishi Kazutoshi
ad4a28f4f6 Refactor translationRunner.js (#3604)
- Use yargs instead of minimist
- Simplify validators
- Fix typo (RFC5626 -> RFC5646)
2017-06-06 13:31:57 +02:00
Yamagishi Kazutoshi
d8ae3efec3 Improve ESLint rules for JSX (#3608)
* Add react/no-string-refs ESLint rule

* Add react/jsx-boolean-value ESLint rule

* Add react/jsx-closing-bracket-location ESLint rule

* Add react/jsx-indent ESLint rule

* Add react/jsx-curly-spacing ESLint rule

* Add react/jsx-equals-spacing ESLint rule

* Add react/jsx-first-prop-new-line ESLint rule

* Add react/jsx-no-duplicate-props ESLint rule

* Add react/jsx-tag-spacing ESLint rule
2017-06-06 13:20:07 +02:00
Yamagishi Kazutoshi
cd81a1c52a Add missing key attribute to .search-results__hashtag (#3607) 2017-06-06 13:19:29 +02:00
May Kittens Devour Your Soul
dcf73ddeff Update hr.json (#3609) 2017-06-06 13:19:05 +02:00
Yamagishi Kazutoshi
d81b706f12 Fix typo (storyboard -> storybook) (#3603) 2017-06-06 04:07:34 +02:00
m4sk1n
30fa5fe1a4 i18n: updated Polish translation (#3597)
* i18n: updated Polish translation

* i18n: updated Polish translation

btw it would be nice to have master-based Mastodon instance (even isolated from others) to test translation.
2017-06-06 03:59:13 +02:00
Yamagishi Kazutoshi
7a7bfa5170 Add quotes ESLint rules (#3602)
* Add quotes ESLint rule

* Add jsx-quotes ESlint rule

* Sort ESLint rules
2017-06-06 03:56:36 +02:00
Yamagishi Kazutoshi
e969c78645 Disable ESLint rule jsx/anchor-has-content (#3601) 2017-06-06 03:55:56 +02:00
ThibG
7adac1bc51 Try fixing ThreadResolveWorker calls (#3599)
* Try fixing ThreadResolveWorker calls

From my understanding of ActiveRecord, a transaction is commited as soon as
the exit of the outmost ActiveRecord.transaction block. However, inner
transaction blocks will exit without the transaction being commited.

In this case, ThreadResolveWorker were fired *within* a transaction block,
so moving the call out of it should do the trick. However, this is somewhat
fragile, as this whole codepath could be called within yet another transaction.

* Set status thread within the transaction block if it is immediately available from database
2017-06-06 00:09:14 +02:00
Naoki Kosaka
e859d6f259 Fix LoadMore in Notifications. (#3590) 2017-06-05 19:18:26 +02:00
Naoki Kosaka
a0880edc6e Fix (PR #3585) Add hasMore to propTypes and cover handleScroll. (#3589) 2017-06-05 18:18:56 +02:00
unarist
61fcdbbf7e Add back button to hashtag timeline again (#3587) 2017-06-05 17:10:40 +02:00
Shunsuke Michii
43af695ba1 Add th.json. (#3588) 2017-06-05 17:02:41 +02:00
IkUrA
facd90e7a6 Add streaming_api_base_url to /api/v1/instance (#3556)
* Add streaming_api_base_url to /api/v1/instance

* Adjust spaces

* nested view

* re-adjust spaces
2017-06-05 16:37:44 +02:00
Matt Jankowski
6201f96b8a Introduce StatusThreadingConcern (#3490)
* Add a StatusFilter class to identify visibility of statuses by accounts

* Extract StatusThreadingConcern from Status

* Clarify purpose of checking for nil account
2017-06-05 16:07:44 +02:00
unarist
c26cea262b Prevent pinned columns from scroll to top on URL changing (#3586) 2017-06-05 15:20:46 +02:00
Naoki Kosaka
1f1d6bf2a0 Fix LoadMore in following and followers. (#3585) 2017-06-05 14:13:20 +02:00
Eugen Rochko
4c06d1cb24 Fix #3550 - Add all missing foreign keys (#3562)
* Fix #3550 - Add all missing foreign keys

* Add missing foreign keys
2017-06-05 13:24:00 +02:00
Daigo 3 Dango
2985d08951 Redirect to streaming_api_base_url (#3579)
* Redirect to streaming_api_base_url

When Rails receives a request to streaming API, it most likely
means that there is another host which is configured to respond
to it. This is to redirect clients to that host if
`STREAMING_API_BASE_URL` is set as another host.

* Use the new Ruby 1.9 hash syntax
2017-06-05 12:09:29 +02:00
Yamagishi Kazutoshi
66ca7157db Add support key shortcut to Onboarding Modal (#3517)
* Add support key shortcut to Onboarding Modal

* this.state.pages -> this.pages
2017-06-05 10:09:14 +02:00
Yamagishi Kazutoshi
4addf051d4 Fix broken embed page (#3577) 2017-06-05 10:08:31 +02:00
Yamagishi Kazutoshi
ab914ce6d5 Add OnboadingModal story (#3578) 2017-06-05 10:08:07 +02:00
Yamagishi Kazutoshi
6a4b224397 Fix randomly fail (regression from #3560) (#3580) 2017-06-05 10:03:36 +02:00
Yamagishi Kazutoshi
6adbd114c1 Skip image length check (regression from #3528) (#3581) 2017-06-05 10:03:01 +02:00
René Klačan
037f96c5ae Don't follow account if it's already followed (#3575)
Closes https://github.com/tootsuite/mastodon/issues/3102
2017-06-05 03:24:18 +02:00
René Klačan
f54dca06a9 Add migration versions (#3574)
Since Rails 5.1 missing migration version results in following error:

```
StandardError: Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for:
```

This PR fixes all migration files.
2017-06-05 02:43:02 +02:00
Quent-in
370fa70924 l10n update for occitan language (#3557)
* i18n Update : Add preference setting for delete toot modal

Adding a line for "Add preference setting for delete toot modal"

* i18n update for pin/unpin

Update to add two more translations

* i18n update to have the dates in plain occitan

* Removed the blank line

* %{selft} back in the translation
2017-06-05 01:31:10 +02:00
Matt Jankowski
5be1214c26 Gem version bumps (#3524)
* Update annotate to version 2.7.2

* Update puma to version 3.9.0

* Update aws-sdk to version 2.9.28

* Update bootsnap to version 1.0.0

* Update nio4r to version 2.1.0

* Update nokogumbo to version 1.4.12

* Update oj to version 3.0.11

* Update pkg-config to version 1.2.3

* Update rubocop to version 0.49.1

* Update sidekiq-scheduler to version 2.1.5
2017-06-05 01:10:13 +02:00
Eugen Rochko
f7a30e2fae Added support for configurable reserved usernames (fix of #1382) (#3566)
* Added support for configurable reserved usernames

* Added reserved usernames from mastodon issue 1355

* Fix reserved usernames
2017-06-05 01:03:45 +02:00
Yamagishi Kazutoshi
3f815b2052 Add date to ignore_missing and ignore_unused in config/i18n-tasks.yml (#3572) 2017-06-05 01:02:19 +02:00
Akihiko Odaki (@fn_aki@pawoo.net)
defe4f9bc3 Cover WebfingerResource more (#3560) 2017-06-04 17:13:37 +02:00
Yamagishi Kazutoshi
943775fd90 Update dependencies of Node.js (#3561)
* Update axios to version 0.16.2

* Update css-loader to version 0.28.4

* Update postcss-smart-import to version 0.7.4

* Update react-immutable-pure-component to version 0.0.5

* Update stringz to version 0.2.1

* Update style-loader to version 0.18.1

* Update websocket.js to version 0.1.9

* yarn upgrade
2017-06-04 17:13:21 +02:00
Akihiko Odaki (@fn_aki@pawoo.net)
42844df966 Spec ScopedSettings (#3559) 2017-06-04 17:07:39 +02:00
Yamagishi Kazutoshi
b0fe58dc69 Upgrade storybook to v3 (#3558) 2017-06-04 16:26:07 +02:00
Akihiko Odaki (@fn_aki@pawoo.net)
e07b57852e Remove some code in TagManager and spec (#3547)
* Do not fall back to StreamEntry if object_type is unavailable in TagManager

Since 6d6a429af8, when Status, the only model
with stream_entry, and StreamEntry got its own logic in uri_for and
url_for, the purpose of the fallbacks to activity_type of StreamEntry
became unclear.

This commit removes the fallbacks. When adding another model with
stream_entry in future, consider to update uri_for and url_for.

* Cover TagManager more
2017-06-04 16:14:25 +02:00
m4sk1n
7c7c18fdea i18n: Updated Polish translation (#3555) 2017-06-04 15:18:42 +02:00
lindwurm
a84664026e l10n: ja: Change about/more link text (#3539)
ref: #3538 ("Extended information" -> "About this instance") and #3519

Signed-off-by: lindwurm <lindwurm.q@gmail.com>
2017-06-04 15:00:15 +02:00
Akihiko Odaki (@fn_aki@pawoo.net)
02a0fd5b64 Spec InlineRablScope (#3542) 2017-06-04 15:00:08 +02:00