Commit Graph

5155 Commits (f0c12b28fd35fe2c19eaff063db4a1c2e457eec7)

Author SHA1 Message Date
kibigo! bbef750b04 Removes spin theme 2017-11-16 21:54:12 -08:00
kibigo! 5845057adb Themed prefetching 2017-11-16 21:37:08 -08:00
David Yip 5f689cdf78 Merge remote-tracking branch 'origin/master' into gs-master 2017-11-16 22:52:37 -06:00
Yamagishi Kazutoshi b80a35092e Redirect to reports when moderator (#5733) 2017-11-17 03:26:34 +01:00
ysksn 08cb63c360 Remove empty strings (#5732) 2017-11-17 10:52:30 +09:00
Eugen Rochko 3df46ce5a8 Fix some rubocop style issues (#5730) 2017-11-17 10:06:26 +09:00
Eugen Rochko 21d01d5809 Display moderator badge (green), admin badge changed to red (#5728) 2017-11-17 01:22:38 +01:00
Renato "Lond" Cerqueira f366a83c6c Improve language filter (#5724)
* Scrub text of html before detecting language.

* Detect language on statuses coming from activitypub.

* Fix rubocop comments.

* Remove custom emoji from text before language detection
2017-11-16 13:51:38 +01:00
ysksn bf1d4a2cb9 Fix AccountFinderConcern::AccountFinder#with_usernames (#5722) 2017-11-16 12:13:03 +01:00
Surinna Curtis 96f629193f Merge pull request #216 from glitch-soc/merge-upstream-ab48f2b
Merge upstream at commit ab48f2b
2017-11-16 01:38:26 -06:00
Surinna Curtis 02ae609d9a Merge tootsuite/master at ab48f2b239 2017-11-16 01:21:16 -06:00
ysksn a766ece166 Add tests for Status#verb (#5717) 2017-11-16 15:46:29 +09:00
David Yip ed9254c4e9 Merge pull request #217 from monsterpit-daggertooth/fix-streaming-host-env
Allow streaming server to take bindhost from HOST env
2017-11-15 23:40:07 -06:00
David Yip 235b13498f Add some examples for Glitch::KeywordMute::TagMatcher. #208. 2017-11-15 23:31:49 -06:00
Daggertooth 3bcaa27a99 Allow streaming server to take bindhost from HOST env 2017-11-15 21:20:35 -06:00
ysksn ab48f2b239 Add tests for Status#hidden? (#5719) 2017-11-16 11:07:27 +09:00
David Yip b4725cad17 Replace =~ with #matches?. #208.
=~ made sense when we were passing it through to a regex, but we're no
longer doing that: TagMatcher looks at individual tags and returns a
value that *looks* like what you get out of #=~ but really isn't that
meaningful.  Probably a good idea to not subvert convention like this
and instead use a name with guessable intent.
2017-11-15 18:27:25 -06:00
David Yip 21e138379d Prefix cache keys with the matcher type. #208.
We already know about one regex limitation, which is that they cannot
segment words in e.g. Japanese, Chinese, or Thai.  It may also end up
that regex matching is too slow compared to other methods.

However, the regex is an implementation detail.  We still want the
ability to switch between "occurs anywhere" and "match whole word", and
caching the matcher result is likely to still be important (since the
matcher itself won't change nearly as often as status ingress rate).
Therefore, we ought to be able to change the cache keys to reflect a
change of data structure.

(Old cache keys expire within minutes, so they shouldn't be too big of
an issue.  Old cache keys could also be explicitly removed by an
instance administrator.)
2017-11-15 18:12:31 -06:00
David Yip 2c6a2d588c Match keyword mute filter on hashtags. #208.
It is reasonable to expect someone to enter #foo to mute hashtag #foo.
However, tags are recorded on statuses without the preceding #.
To adjust for this, we build a separate tag matcher and use
Tag::HASHTAG_RE to extract a hashtag from the hashtag syntax.
2017-11-15 18:12:29 -06:00
David Yip dd29a41b61 Also run the keyword matcher on a status' tags. #208. 2017-11-15 18:12:26 -06:00
beatrix ed1cf698a2 Merge pull request #212 from aschmitz/feat/mute-reblogs
Allow hiding reblogs on a per-follow basis
2017-11-15 12:01:17 -05:00
Daniel Hunsaker fc2366daf3 [Nanobox] Apply Release Notes Changes (#5670)
Apparently I missed some things in earlier commits/releases that needed to be applied to the Nanobox setup. All minor things, nothing that breaks anything, but still best to get them in place.

- Move cron jobs to their own component, so the Sidekiq component can be scaled up to multiple instances without causing issues with running the same cron job multiple times at once.
- Update cron jobs to the latest requirements, removing extraneous ones
- Add new variables to `.env.nanobox`
- Update Nginx to use correct cache header directives
2017-11-15 16:26:53 +01:00
ysksn 475b7cecb5 Delegate some methods of User to @settings (#5706)
* Move some tests of User into Settings::ScopedSettings

* Add a test for User@settings
2017-11-15 16:05:20 +01:00
ysksn 2e5aec4479 Add a test for Tag#to_param (#5705) 2017-11-15 16:04:41 +01:00
masarakki 7d3b67e1c8 reusable-streaming (#5709) 2017-11-15 16:04:15 +01:00
mayaeh 7ffee9cc9d Add Japanese translation for DM block option. (#5704) 2017-11-15 03:57:09 +01:00
Surinna Curtis 582dd1b7c7 Optional notification muting (#5087)
* Add a hide_notifications column to mutes

* Add muting_notifications? and a notifications argument to mute!

* block notifications in notify_service from hard muted accounts

* Add specs for how mute! interacts with muting_notifications?

* specs testing that hide_notifications in mutes actually hides notifications

* Add support for muting notifications in MuteService

* API support for muting notifications (and specs)

* Less gross passing of notifications flag

* Break out a separate mute modal with a hide-notifications checkbox.

* Convert profile header mute to use mute modal

* Satisfy eslint.

* specs for MuteService notifications params

* add trailing newlines to files for Pork :)

* Put the label for the hide notifications checkbox in a label element.

* Add a /api/v1/mutes/details route that just returns the array of mutes.

* Define a serializer for /api/v1/mutes/details

* Add more specs for the /api/v1/mutes/details endpoint

* Expose whether a mute hides notifications in the api/v1/relationships endpoint

* Show whether muted users' notifications are muted in account lists

* Allow modifying the hide_notifications of a mute with the /api/v1/accounts/:id/mute endpoint

* make the hide/unhide notifications buttons work

* satisfy eslint

* In probably dead code, replace a dispatch of muteAccount that was skipping the modal with launching the mute modal.

* fix a missing import

* add an explanatory comment to AccountInteractions

* Refactor handling of default params for muting to make code cleaner

* minor code style fixes oops

* Fixed a typo that was breaking the account mute API endpoint

* Apply white-space: nowrap to account relationships icons

* Fix code style issues

* Remove superfluous blank line

* Rename /api/v1/mutes/details -> /api/v2/mutes

* Don't serialize "account" in MuteSerializer

Doing so is somewhat unnecessary since it's always the current user's account.

* Fix wrong variable name in api/v2/mutes

* Use Toggle in place of checkbox in the mute modal.

* Make the Toggle in the mute modal look better

* Code style changes in specs and removed an extra space

* Code review suggestions from akihikodaki

Also fixed a syntax error in tests for AccountInteractions.

* Make AddHideNotificationsToMute Concurrent

It's not clear how much this will benefit instances in practice, as the
number of mutes tends to be pretty small, but this should prevent any
blocking migrations nonetheless.

* Fix up migration things

* Remove /api/v2/mutes
2017-11-15 03:56:41 +01:00
ysksn bde85899a5 Add tests for StreamEntry (#5687)
* Add tests for StreamEntry

- `#object_type`
- `#verb`
- `#mentions`

* Fix to test results instead of implementations
2017-11-15 02:00:58 +01:00
ThibG 74de5566d4 Filter searched toots to be consistent with blocking behaviors (#5383) 2017-11-15 01:53:33 +01:00
ThibG 4531b67c3e Use already-known remote user data if resolving temporarily fails in mentions (#5702) 2017-11-15 01:06:49 +01:00
Eugen Rochko a71791e3f1 Allow specifying STATSD_NAMESPACE (#5700) 2017-11-15 07:22:43 +09:00
Eugen Rochko 80873c1134 Add option to block direct messages from people you don't follow (#5669)
* Add option to block direct messages from people you don't follow

Fix #5326

* If the DM responds to a toot by recipient, allow it through

* i18n: Update Polish translation (for #5669) (#5673)
2017-11-14 21:12:57 +01:00
SerCom_KC 66a0141691 Updating Chinese (Simplified) translations (#5643)
* i18n: (zh-CN) Bug fix for note-counter.

* i18n: (zh-CN) Improve translations

* i18n: (zh-CN) Improve translations

* i18n: (zh-CN) Add missing translations

* i18n: (zh-CN) Improve translations

* i18n: (zh-CN) Add support.array key for better wording

* Revert "i18n: (zh-CN) Add support.array key for better wording"

This reverts commit 27bf9a946e886213e827cd985d4f62419db57534.
Looks like this commit can't get pass the checks, revert it for now.

* i18n: (zh-CN) Change `客户端` to `应用`

* i18n: (zh-CN) Improve translations

* i18n: (zh-CN) Add missing translations (#5635)

* i18n: (zh-CN) Change `两步验证` to `双重认证`

* i18n: (zh-CN) Improve translations
2017-11-14 20:44:42 +01:00
ysksn 63714ad94a Add a test for SiteUpload#cache_key (#5685) 2017-11-14 20:44:11 +01:00
Yamagishi Kazutoshi 1c83ce9b81 Refactor remote_follow_spec.rb (#5690) 2017-11-14 20:41:17 +01:00
Yamagishi Kazutoshi 3a51544e9a Add uniqueness to block email domains (#5692) 2017-11-14 20:37:17 +01:00
Marcin Mikołajczak fa89e5d911 i18n: Update Polish translation (#5699)
Signed-off-by: Marcin Mikołajczak <me@m4sk.in>
2017-11-14 20:36:11 +01:00
Lain Iwakura a77e03ede4 Rename MAX_CHARS to MAX_TOOT_CHARS to be more specific. 2017-11-14 17:56:38 +01:00
Lain Iwakura f517cbae22 Code style fixes. 2017-11-14 16:54:04 +01:00
Lain Iwakura 3de2814a5a Handle character limit in initial state in frontend. 2017-11-14 16:24:10 +01:00
Lain Iwakura a45f3cdc69 Return character limit in API and initial state. 2017-11-14 16:23:12 +01:00
Lain Iwakura 666540f4a8 Make character limit configurable. 2017-11-14 16:22:34 +01:00
Andrew 1d0a72c00b Updates and fixes to win95 theme 2017-11-14 01:22:48 -08:00
mayaeh 5aca968bb7 Add Japanese translations for moderator roles and its own admin actions. (#5689) 2017-11-14 15:53:14 +09:00
Marcin Mikołajczak 57ea54ba00 i18n: fix typo in Polish translation (#5688) 2017-11-14 15:52:32 +09:00
ysksn 9b7f9f3527 Add tests for Setting (#5683) 2017-11-14 11:08:04 +09:00
Anna e só c4c9003f84 l10n: PT-BR translation updated (#5681)
* Improved e-mail messages; delted repeated words

* pt-BR.json translations updated

* Revert "pt-BR.json translations updated"

This reverts commit 108c460531196fed6e6d14f93e8d8d047c835ffd.

* Updated pt-BR.json

* pt-BR.yml updated
2017-11-14 11:07:38 +09:00
David Yip b86f2e3662 Merge pull request #214 from glitch-soc/keyword-mute
Maintain case-insensitivity when merging multiple matchers (#213)
2017-11-13 12:33:19 -06:00
David Yip 13ec4a9a20 Maintain case-insensitivity when merging multiple matchers (#213)
When given two regexps, Regexp.union preserves the options set (or not
set) on each regex; this meant that none of the multiline (m),
case-insensitivity (i), or extended syntax (x) options were set.  Our
regexps are written expecting the m, i, and x options were set on all of
them, so we need to make sure that we preserve that behavior.
2017-11-13 11:06:02 -06:00
Eugen Rochko f162e1dc89 Add code of conduct from GitHub generator (#5674) 2017-11-13 17:28:55 +01:00