Commit Graph

3522 Commits (b07111ceba155a86d4fad4e9041a9dc154df9bd1)

Author SHA1 Message Date
Alda Marteau-Hardi 191993c811 Use account.display_name for og:title single toot pages (#5821) 2017-11-27 05:31:26 +01:00
Akihiko Odaki ce0d30feb7 Do not filter the status collection after muting and blocking (#5815)
Filtering the status collection wipes out even the profiles of muted and
blocked accounts. However, the behavior is inconsistent with the server-
side behavior.
2017-11-26 01:45:17 +01:00
SerCom_KC 7cdf02f2d4 i18n: (zh-CN) Add translations for #5746 & #5750 (#5816) 2017-11-26 02:38:40 +09:00
Akihiko Odaki 16a49799cf Allow to open a modal for embedded photo (#5777) 2017-11-25 15:41:45 +01:00
Akihiko Odaki 7df80c9e83 Rename ariaLabel property of Dropdown to title (#5813)
DropdownMenu has ariaLabel property, but it is actually applied to title
property of IconButton. Keep it consistent.
2017-11-25 15:41:08 +01:00
spla eddbf2e485 Updated Catalan strings (#5801)
* Updated Catalan strings

* Update ca.yml

* Update ca.yml

* Update ca.yml

* Update ca.yml

* Update ca.yml

* Update ca.yml

* Update ca.yml

* Update simple_form.ca.yml

* Update simple_form.ca.yml

* Update simple_form.ca.yml

* bundle exec i18n-tasks

* Update ca.json

* Update simple_form.ca.yml
2017-11-25 23:22:59 +09:00
Jenkins 7fcbe5faee Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 2017-11-25 05:17:15 +00:00
Yamagishi Kazutoshi 8fde0aed51 Add Japanese translations (#5810)
* yarn manage:translations

* Add Japanese translation for #5087

* Add Japanese translation for #5616

* Add Japanese translation for #5746

* Add Japanese translation for #5750
2017-11-25 03:39:57 +01:00
William Pitcock a4bb95d8b3 status: preserve visibility attribute when reblogging (infoleak fix) (#5789)
this should fix *all* remaining visibility-related mastodon ostatus infoleaks.
thanks to @csaurus@gnusocial.de for pointing out the infoleak.
2017-11-25 01:36:08 +01:00
Eugen Rochko bf8eab12ba Display list column (#5750) 2017-11-25 00:35:37 +01:00
abcang 3db3ca1258 Fix unnecessary order (#5807) 2017-11-24 18:41:07 +01:00
sdukhovni 019c39bf1d Don't remove originals of boosted toots from timeline (#5479)
* Don't remove originals of boosted toots from timeline

* Remove unused argument to updateTimeline
2017-11-24 14:43:53 +01:00
Akihiko Odaki 0319b92979 Do not require onClose property in NavigationBar (#5802)
NavigationBar can be used as mock as it is in OnboardingModal. In such a
case, onClose property is not required.
2017-11-24 13:13:17 +01:00
Jenkins 359ba16721 Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 2017-11-24 01:17:20 +00:00
Eugen Rochko efc97d404c Add logging of admin actions (#5757)
* Add logging of admin actions

* Update brakeman whitelist

* Log creates, updates and destroys with history of changes

* i18n: Update Polish translation (#5782)

Signed-off-by: Marcin Mikołajczak <me@m4sk.in>

* Split admin navigation into moderation and administration

* Redesign audit log page

* 🇵🇱 (#5795)

* Add color coding to audit log

* Change dismiss->resolve, log all outcomes of report as resolve

* Update terminology (e-mail blacklist) (#5796)

* Update terminology (e-mail blacklist)

imho looks better

* Update en.yml

* Fix code style issues

* i18n-tasks normalize
2017-11-24 02:05:53 +01:00
kibigo! 3860750d5d Styling fixes 2017-11-21 19:00:07 -08:00
kibigo! ea77b60648 Update statuses on hidden toggle (Fixes #227) 2017-11-21 18:27:34 -08:00
kibigo! eadf1c38a5 Minor fixes 2017-11-21 18:17:38 -08:00
Jenkins a2e4d79b1c Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 2017-11-21 17:17:11 +00:00
Marcin Mikołajczak c75bc101ba i18n: Update Polish translation - front-end added (#231)
* i18n: Update Polish translation

Signed-off-by: Marcin Mikołajczak <me@m4sk.in>

* i18n: Update Polish translation

Signed-off-by: Marcin Mikołajczak <me@m4sk.in>
2017-11-21 17:53:13 +01:00
Joan Montané daec402a58 Update and fix Catalan translation (#5773)
* Update activerecord.ca.yml

* Update ca.yml

* Update devise.ca.yml

* Update doorkeeper.ca.yml

* Update simple_form.ca.yml

* fix syntax error for ca translation

* fix syntax errors in ca translations

Signed-off-by: Marcin Mikołajczak <me@m4sk.in>
2017-11-21 23:17:28 +09:00
kibigo! 8aeda4f064 Finalized theme loading and stuff 2017-11-20 22:13:37 -08:00
Jenkins 1c33bd3d3a Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 2017-11-21 05:17:12 +00:00
abcang 4e409e629d Fixed duplicating URL of photo type of oEmbed (#5763) 2017-11-20 20:45:54 +01:00
Jenkins 9c9b105d43 Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 2017-11-19 15:17:12 +00:00
abcang ef14321fff Fix NoMethodError at ActivityPub::FetchRemoteStatusService (#5753) 2017-11-19 15:33:15 +01:00
abcang defb2fd0b0 Fix N+1 at notification (#5752) 2017-11-19 15:32:48 +01:00
David Yip 1dc24ece41 Merge remote-tracking branch 'tootsuite/master' 2017-11-19 01:30:29 -06:00
Yamagishi Kazutoshi bffc1b880b Add “staff” badge to admin user pages (#5735)
* Allow staff badge to change from setting to hidden

* i18n: Update Polish translation
2017-11-19 04:13:57 +01:00
beatrix 34ba45e47c Merge pull request #226 from glitch-soc/glitch-theme
Glitch/Vanilla themes
2017-11-18 20:32:17 -05:00
kibigo! 2b05c3aaa1 Merge remote-tracking branch 'cybre/theme_win95' into glitch-theme 2017-11-18 15:18:00 -08:00
kibigo! e56a32a46b WIP static themeing 2017-11-18 15:12:52 -08:00
kibigo! 25361848e3 Enabled vanilla thmee 2017-11-18 11:06:04 -08:00
kibigo! f0aedba604 Public pack fix 2017-11-18 11:05:39 -08:00
kibigo! a8c0c7a2c1 Media styling 2017-11-18 11:05:23 -08:00
kibigo! 0c90d1ab38 Font styles are now packagified 2017-11-18 11:05:00 -08:00
Eugen Rochko b89f614bd7 Profile redirect notes (#5746)
* Serialize moved accounts into REST and ActivityPub APIs

* Parse federated moved accounts from ActivityPub

* Add note about moved accounts to public profiles

* Add moved account message to web UI

* Fix code style issues
2017-11-18 19:39:02 +01:00
beatrix 27ca589183 Merge pull request #208 from yipdw/keyword-mute
Run keyword mutes on hashtags
2017-11-18 12:06:40 -05:00
Jenkins cea7dec340 Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 2017-11-18 06:17:14 +00:00
SerCom_KC e618b6c136 Updating Chinese (Simplified) translations (#5725)
* i18n: (zh-CN) Improve translations

* i18n: (zh-CN) Change `静音` to `隐藏`

* i18n: (zh-CN) Add translations for #5087 & #5669

* i18n: (zh-CN) Improve translations

* i18n: (zh-CN) Improve translations

* i18n: (zh-CN) Improve translations

* i18n: (zh-CN) Improve translations

* i18n: (zh-CN) Add missing translation for #5728
2017-11-18 14:35:11 +09:00
kibigo! 5466150ea4 Removed glitch tests 2017-11-17 19:29:17 -08:00
kibigo! 7c5614c667 Restore vanilla components 2017-11-17 19:29:16 -08:00
kibigo! 68304a6ce5 Forking glitch theme 2017-11-17 19:29:16 -08:00
beatrix 61585f2c42 Merge pull request #223 from glitch-soc/glitchsoc/feature/configurable-status-size
Make character limit configurable (from tootsuite/mastodon#5697)
2017-11-17 19:02:40 -05:00
David Yip 08751360a0 Update annotations on Follow, FollowRequest, and Mute.
Follow and FollowRequest had conflicts in their schema annotations, so I
ran latest migrations and let annotate_models fix them up.
2017-11-17 17:41:15 -06:00
David Yip f1279d8ff3 Merge remote-tracking branch 'origin/master' into merge-upstream 2017-11-17 17:40:00 -06:00
Eugen Rochko e149067561 Lists (#5703)
* Add structure for lists

* Add list timeline streaming API

* Add list APIs, bind list-account relation to follow relation

* Add API for adding/removing accounts from lists

* Add pagination to lists API

* Add pagination to list accounts API

* Adjust scopes for new APIs

- Creating and modifying lists merely requires "write" scope
- Fetching information about lists merely requires "read" scope

* Add test for wrong user context on list timeline

* Clean up tests
2017-11-18 00:16:48 +01:00
David Yip ce27681a76 Merge pull request #222 from yipdw/merge/tootsuite/master
Merge upstream (5982d57.. 065e238)
2017-11-17 14:35:16 -06:00
David Yip e5a2158e2a Merge remote-tracking branch 'lambadalambda/feature/configurable-status-size' into glitchsoc/feature/configurable-status-size 2017-11-17 14:28:16 -06:00
beatrix 57e301c5be Merge pull request #221 from glitch-soc/local-only-policy
Update StatusPolicy to check current_account for local_only? toots.
2017-11-17 15:17:49 -05:00
Jenkins 065e2388ba Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 2017-11-17 20:17:12 +00:00
David Yip 87c1f91505 Merge pull request #218 from glitch-soc/themed-prefetching
Themed preloading
2017-11-17 14:01:23 -06:00
Lynx Kotoura 731c859097 Increase contrast of Admin badges (#5740)
To comply WCAG 2.0 guidelines on contrast ratio.
2017-11-17 19:59:53 +01:00
Clworld 6547ebee48 Fix regression #5467: fixes emoji copy (#5739) 2017-11-17 18:22:31 +01:00
David Yip bcdd0f8b9d Update StatusPolicy to check current_account for local_only? toots.
StatusPolicy#account was renamed to StatusPolicy#current_account in
upstream.  This commit renames the local-only changes to match and
augments the #show? policy spec with what we expect for local-only
toots.
2017-11-17 09:07:21 -06:00
unarist 5982d570de Move "Permissions" row into main table in /admin/accounts/:id (#5734) 2017-11-17 15:18:20 +01:00
David Yip ff4e474bcd Add trailing comma in mapStateToProps
Consistency, eslint, etc.
2017-11-17 00:24:22 -06:00
David Yip c687853d80 Merge pull request #219 from glitch-soc/no-spin
Remove 'spin' theme
2017-11-17 00:14:24 -06:00
David Yip 801ecbfa5a Throw layout, isWide, navbarUnder back into mapStateToProps.
This gets wide view, auto layout, and navbar-under-mobile working again.
2017-11-17 00:11:01 -06:00
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
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 02ae609d9a Merge tootsuite/master at ab48f2b239 2017-11-16 01:21:16 -06: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
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
masarakki 7d3b67e1c8 reusable-streaming (#5709) 2017-11-15 16:04:15 +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
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 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
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
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 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
Daniel Hunsaker 96504fd1ec Update model annotations to use BIGINT for IDs (#5461)
All the migrations have been updated to use BIGINTs for ID fields in the DB, but ActiveRecord needs to be told to treat those values as BIGINT as well. This PR does that.
2017-11-12 16:18:50 +01:00
aschmitz 3fe59e7d97 Actually filter blocked reblogs from feed
And even a relevant test. Whoops.
2017-11-11 22:10:49 -06:00
Eugen Rochko 9caf162432 Fix #5632 - Reset column loading status after fetch fail (#5659) 2017-11-12 12:51:07 +09:00
aschmitz 869cfdfda6 Don't update follower counts on reblog toggle 2017-11-11 21:42:22 -06:00
aschmitz 76008c3e8c Updates per code review
Thanks, @valerauko!
2017-11-11 14:37:23 -06:00
Eugen Rochko 97178b6d86 Add moderator role and add pundit policies for admin actions (#5635)
* Add moderator role and add pundit policies for admin actions

* Add rake task for turning user into mod and revoking it again

* Fix handling of unauthorized exception

* Deliver new report e-mails to staff, not just admins

* Add promote/demote to admin UI, hide some actions conditionally

* Fix unused i18n
2017-11-11 20:23:33 +01:00
ThibG df882d5a59 Retry thread resolving (#5599)
Thread resolving is one of the few tasks that isn't retried on failure.
One common cause for failure of this task is a well-connected user replying to
a toot from a little-connected user on a small instance: the small instance
will get many requests at once, and will often fail to answer requests within
the 10 seconds timeout used by Mastodon.

This changes makes the ThreadResolveWorker retry a few times, with a
rapidly-increasing time before retries and large random contribution in order
to spread the load over time.
2017-11-11 16:49:04 +01:00
aschmitz 2f1fdd37d3 Per-user reblog hiding implementation/fixes/tests
Note that this will only hide/show *future* reblogs by a user, and does
nothing to remove/add reblogs that are already in the timeline. I don't
think that's a particularly confusing behavior, and it's a lot easier
to implement (similar to mutes, I believe).
2017-11-10 22:04:54 -06:00
Lynx Kotoura 37992a1012 Fix focused background color of direct toots (#5642) 2017-11-09 19:40:34 +01:00
aschmitz 2aedd8eaad "Show reblogs" per-follower UI/database changes
TODO:

* Tests (particularly for FollowRequests).
* Anything to respect the setting when putting reblogs in timelines.
2017-11-09 08:41:10 -06:00
ysksn 26f52a2551 Add and Remove tests for FollowRequest (#5622)
* Add a test for FollowRequest#authorize!

* Remove tests

There is no need to test
ActiveModel::Validations::ClassMethods#validates.

* Make an alias of destroy! as reject!

Instead of defining the method,
make an alias of destroy! as reject! because of reducing test.
2017-11-09 14:36:52 +01:00
unarist 1cb6606055 Show confirmation dialog on leaving WebUI while composing (#5616)
* Show confirmation dialog on leaving WebUI while composing

Currently, Back button and Back hotkey can cause leaving from WebUI, as well as browser's back button. Users may hit those buttons accidentally, and their composing text will be lost.

So this prevents it by showing confirmation dialog from `onbeforeunload` event.

* Fix message and comments
2017-11-09 14:34:41 +01:00
Quenty31 a7db7bdd96 i10n OC: Memorial (#5615) + #5467 (#5623)
* Changed ĩ => ï

* Changed ĩ => ï

* Add ability to disable login and mark accounts as memorial (#5615)
2017-11-08 15:19:49 +01:00
ThibG 5abd97e5ba Fix process mentions for local users, as local users are considered to use OStatus (#5618) 2017-11-07 22:15:15 +01:00
nullkal 863958ce09 Eliminate space around emoji (#5474)
* Eliminate space around emoji

* More improve emoji style

* Make more compatible with Twemoji

* Make scss-lint happy

* Make not modify normal emoji's behavior

* Decrease status__action-bar's margin-top to 5px

* Make the test be passed

* Revert "Make the test be passed"

This reverts commit 54a8c60e5907ef20a5ceb5ab2c86a933e06f3ece.

* Revert "Make not modify normal emoji's behavior"

This reverts commit 6a5bdf0c11df16ebd190cb3ab9d2e8f1349f435a.
2017-11-07 19:09:53 +01:00
ThibG 4912f539c3 Twidere mention workaround (#5552)
* Work around Twidere and Tootdon bug

Tootdon and Twidere construct @user@domain handles from mentions in toots based
solely on the mention text and account URI's domain without performing any
webfinger call or retrieving account info from the Mastodon server.

As a result, when a remote user has WEB_DOMAIN ≠ LOCAL_DOMAIN, Twidere and
Tootdon will construct the mention as @user@WEB_DOMAIN. Now, this will usually
resolve to the correct account (since the recommended configuration is to have
WEB_DOMAIN perform webfinger redirections to LOCAL_DOMAIN) when processing
mentions, but won't do so when displaying them (as it does not go through the
whole account resolution at that time).

This change rewrites mentions to the resolved account, so that displaying the
mentions will work.

* Use lookbehind instead of non-capturing group in MENTION_RE

Indeed, substitutions with the previous regexp would erroneously eat any
preceding whitespace, which would lead to concatenated mentions in the
previous commit.

Note that users will “lose” up to one character space per mention for their
toots, as that regexp is also used to remove the domain-part of mentioned
users for character counting purposes, and it also erroneously removed the
preceding character if it was a space.
2017-11-07 19:08:14 +01:00
Eugen Rochko 7f1a0241c1 Add ability to disable login and mark accounts as memorial (#5615)
Fix #5597
2017-11-07 19:06:44 +01:00
voidSatisfaction dc63306620 fix: slang to adequate word (#5453) 2017-11-07 14:49:50 +01:00
nullkal 19f82492ab Show the local couterpart of emoji when it exists in /admin/custom_emojis (#5467)
* Show the local couterpart of emoji when it exists in admin/custom_emojis

* Fix indentation

* Fix error

* Add class table-action-link to Overwrite link

* Make it enable to overwrite emojis

* Make Code Climate happy
2017-11-07 14:49:32 +01:00
MIYAGI Hikaru 3506668438 Avoid emojifying on invisible text (#5558) 2017-11-07 14:48:13 +01:00
ThibG 02608c2292 Do not process undeliverable mentions (#5598)
* Resolve remote accounts when mentioned even if they are already known

This commit reduces the risk of not having up-to-date public key or protocol
information for a remote account, which is required to deliver toots
(especially direct messages).

* Do not add mentions in private messages for remote users we cannot deliver to

Mastodon does not deliver private and direct toots to OStatus users, as there
is no guarantee the remote software understands the toot's privacy. However,
users currently do not get any feedback on it (Mastodon won't attempt delivery,
but the toot will be displayed exactly the same way to the user).

This change introduces *some* feedback by not processing mentions that are
not going to be delivered. A long-term solution is still needed to have
delivery receipts or at least some better indication of what is going on, but
at least an user can see *something* is up.
2017-11-07 14:47:39 +01:00
ThibG a8249d2486 Resolve remote accounts when mentioned even if they are already known (#5539)
This commit reduces the risk of not having up-to-date public key or protocol
information for a remote account, which is required to deliver toots
(especially direct messages).
2017-11-07 14:31:57 +01:00
nullkal 64fbf1d6e5 Make fullscreen video in detailed status plays in fullscreen (Partly Fix #5160) (#5611)
* Make fullscreen video in detailed status plays in fullscreen (Fix #5160)

* Directly assign the initial state
2017-11-07 14:24:55 +01:00
kedama 82e9df5e3c Hide disabled custom emojis from emoji picker and emoji auto suggestions. (#5613)
Make the same behavior as /api/v1/custom_emojis.
2017-11-07 14:24:21 +01:00
kibigo! f9e8e1357e Mastodon GO! -> v0.1.1 2017-11-06 20:00:03 -08:00
kibigo! b0f88fbdc1 Autocollapse boosts option 2017-11-05 15:05:12 -08:00
MIYAGI Hikaru 70726e0f72 don't display any descendants of .invisible (#5567)
* don't display any descendants of .invisible

* reduce the scope of selector

* remove some rules for image

* lint
2017-11-05 13:05:50 +01:00
beatrix 0f6d6186b6 Merge pull request #204 from glitch-soc/with-mastodon-go
Introducing: Mastodon GO!
2017-11-04 09:14:08 -04:00
kibigo! 23a15bd315 Introducing: Mastodon GO! 2017-11-04 05:48:42 -07:00
Quenty31 b6f057365d l10n Occitan (#5586)
* Update OC: time format

Correction for time format according to: https://opinion.jornalet.com/conselh-linguistic-de-jornalet/blog/2379/la-notacion-oraria-en-occitan
Harmonisation words in menu and confirmation windows

* Update for unlisted custum emoji + #5577

* correction subjonctiu

It's either siasque or siague

* Corrections

Any : qual que, in two words, else it means "some".
And "siasque" with S even if I don't pronounce it at all.

* Update oc.json
2017-11-03 17:42:30 +09:00
MitarashiDango 3068add21d add account search condition (instance domain) (#5577) 2017-11-01 14:46:05 +01:00
Sorin Davidoi 2c6bb251c5 refactor(features/ui): Avoid useless renders in WrappedSwitch (#5580) 2017-11-01 12:17:53 +01:00
Yamagishi Kazutoshi c858c1a2b8 Replace react-router-scroll to react-router-scroll-4 (#5568) 2017-11-01 06:58:38 +09:00
Nolan Lawson 4a7046e607 Refactor initial state: auto_play_gif (#5576) 2017-11-01 06:58:07 +09:00
Nolan Lawson ba22580c06 Add ServiceWorker caching for static assets (#5524) 2017-10-31 12:25:51 +01:00
Nolan Lawson b89628424d Refactor initial state: "me" (#5563)
* Refactor initial state: "me"

* remove "me" from reducers/meta.js
2017-10-31 11:27:48 +09:00
SerCom_KC 282f0d7479 Updating Chinese (Simplified) translations (#5508)
* i18n: (zh-CN) fix punctuations and spaces
Spaces are fixed according to https://github.com/sparanoid/chinese-copywriting-guidelines

* i18n: (zh-CN) fix punctuation

* i18n: (zh-CN) Adapt official translation of Discourse Privacy Policy from GitHub, with minor fixes
https://github.com/discourse/discourse/blob/master/config/locales/server.zh_CN.yml#L2677

* i18n: (zh-CN) Update missing translations

* i18n: (zh-CN) Fixing errors

* i18n: (zh-CN) Fix indent error

* i18n: (zh-CN) Fix language tag

* i18n: (zh-CN) Remove quotes

* i18n: (zh-CN) Update translation (#5485)

* i18n: (zh-CN) Remove whitespaces, x -> ×

* i18n: (zh-CN) Rewording on time distance

* i18n: (zh-CN) Overall improvements

* i18n: (zh-CN) i18n-tasks normalization

* i18n: (zh-CN) Add missing translation
2017-10-30 12:34:58 +09:00
ThibG fec32921d5 Update remote ActivityPub users when fetching their toots (#5545) 2017-10-30 00:24:16 +09:00
Nolan Lawson aa85f4cf73 Avoid modifying emoji data inline (#5548) 2017-10-30 00:23:38 +09:00
Nolan Lawson 6c6c67b52b Add margin to account for Edge disappearing scrollbar (#5522)
* Add margin to account for Edge disappearing scrollbar

* Fix 16px margin for DMs and horizontal line
2017-10-30 00:11:32 +09:00
Nolan Lawson fc075b16d9 Reactor unfollow_modal, boost_modal, delete_modal (#5505) 2017-10-30 00:10:15 +09:00
Herbert Kagumba c652eefd3c Separate Follow/Unfollow and back buttons (#5496) 2017-10-27 19:14:11 +02:00
ThibG b41ed24f74 Instantiate service classes for each call (fixes #5540) (#5543) 2017-10-27 19:08:30 +02:00
Nolan Lawson 6a7deb8fc8 Avoid unnecessary Motion components in icon_button.js (#5544) 2017-10-27 19:08:07 +02:00
Nolan Lawson 7286e6dcf0 Directly use <Motion/> if not reducing motion (#5546) 2017-10-27 19:06:54 +02:00
Nolan Lawson 2085c1fa33 Refactor initial state: reduce_motion and auto_play_gif (#5501) 2017-10-28 00:04:44 +09:00
David Yip 2aec3c073b Merge branch 'master' into gs-master 2017-10-27 09:45:25 -05:00
nullkal 0a9cc96cdc Feature: Unlisted custom emojis (#5485) 2017-10-27 16:11:30 +02:00
puckipedia 2c06b21883 Allow ActivityPub Note's tag and attachment to be single objects (#5534) 2017-10-27 16:10:36 +02:00
Andrew 120fc4ef61 Theme: Windows 95 2017-10-26 23:22:48 -07:00
Jenkins c388f66ecc Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 2017-10-26 15:08:34 +00:00
erin fe11a72c0b Fix copying emojos: redirect to the page you were on (#5509) 2017-10-26 23:44:24 +09:00
David Yip d3db08b69f Merge remote-tracking branch 'origin/master' into gs-master 2017-10-26 09:18:27 -05:00
りんすき e6f7ccb786 Fix column design broken with very long title (#5493)
* Fix #5314

* fix not beautiful code

* fix broken design with mobile view

* remove no longer needed code
2017-10-26 22:52:48 +09:00
Nolan Lawson afe5176ee8 Remove translateZ(0) on modal overlay (#5478) 2017-10-26 22:46:50 +09:00
beatrix ce738197b9 Merge pull request #179 from glitch-soc/keyword-mute
Keyword muting
2017-10-25 17:37:48 -04:00
David Yip eef50289c6 Merge remote-tracking branch 'STJrInuyasha/feature/direct-timeline' into gs-direct-timeline 2017-10-25 16:01:20 -05:00
Jenkins cfc46d7334 Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master 2017-10-25 16:17:14 +00:00
Ratmir Karabut 51d4add08d Update Russian translation (#5517)
* Add Russian translation (ru)

* Fix a missing comma

* Fix the wording for better consistency

* Update Russian translation

* Arrange Russian setting alphabetically

* Fix syntax error

* Update Russian translation

* Fix formatting error

* Update Russian translation

* Update Russian translation

* Update ru.jsx

* Fix syntax error

* Remove two_factor_auth.warning (appears obsolete)

* Add missing strings in ru.yml

A lot of new strings translated, especially for the newly added admin section

* Fix translation consistency

* Update Russian translation

* Update Russian translation (pluralizations)

* Update Russian translation

* Update Russian translation

* Update Russian translation (pin)

* Update Russian translation (account deletion)

* Fix extra line

* Update Russian translation (sessions)

* Update Russian translation

* Update Russian translation

* Fix merge conflicts (revert)

* Update Russian translation

* Update Russian translation (fix)

* Update Russian translation (fix quotes)

* Update Russian translation (fix quotes)

* Update Russian translation (fix)

* Update Russian translation

* Add quotes

* bundle exec i18n-tasks normalize
2017-10-26 00:21:58 +09:00
Olivier Nicole fe8646f078 Complete Esperanto translation (#5520) 2017-10-25 22:38:37 +09:00