Commit Graph

2245 Commits (05833fc24aeb449489a0b444804125d267bf158c)

Author SHA1 Message Date
abcang 572513b0b0 rescue HTTP::ConnectionError (#3992) 2017-06-29 13:04:07 +02:00
Akihiko Odaki (@fn_aki@pawoo.net) f2c73de856 Use multiple pairs for zadd in PrecomputeFeedService (#3990) 2017-06-29 01:25:31 +02:00
Akihiko Odaki (@fn_aki@pawoo.net) 05f73fbdab Reduce number of commands in FeedManager#trim (#3989) 2017-06-29 01:17:26 +02:00
Eugen Rochko e49dd75db7 Do not fail to create access token if superapp was never created (#3986) 2017-06-28 17:43:48 +02:00
Akihiko Odaki (@fn_aki@pawoo.net) fa7649409b Overwrite old statuses with reblogs in PrecomputeFeedService (#3984) 2017-06-28 14:50:23 +02:00
m4sk1n a7547bd97f i18n: Use instance name in email notifications instead of Mastodon (pl) (#3976)
Signed-off-by: Marcin Mikołajczak <me@m4sk.in>
2017-06-27 23:10:43 +02:00
m4sk1n f01327d859 i18n: Turn report screen into a modal (pl) (#3974) 2017-06-27 22:14:31 +02:00
Sorin Davidoi eea5c01a41 fix(components/status): Up & down jump due to content being added to the DOM (#3972) 2017-06-27 18:43:53 +02:00
Eugen Rochko 0d316bcfd2 Turn report screen into a modal (#3965) 2017-06-27 18:07:21 +02:00
Midgard 39b7512782 Use instance name in email notifications instead of "Mastodon" (#3763)
* Use instance name in "password changed" mail

instead of "Mastodon".

Fixes tootsuite#2620.

* Use instance name in password reset mail

instead of "Mastodon".
2017-06-27 14:22:36 +02:00
Sorin Davidoi d6006ecb4b Responsive images in media gallery (#3963)
* feat(components/media_gallery): Responsive images

* fix(components/media_gallery): Link to image URL
2017-06-27 13:46:37 +02:00
Yamagishi Kazutoshi 8a9408b7c3 Maintain aspect ratio for preview image (#3966) 2017-06-27 13:43:53 +02:00
Eugen Rochko d0221b05bc Fix #1624 - Send e-mail notifications to admins about new reports (#3949) 2017-06-27 00:04:00 +02:00
ThibG b9e0e43128 Raise an error if salmon request response is unsatisfactory (#3960) 2017-06-26 19:39:58 +02:00
Alda Marteau-Hardi 103f87f9ae Translate pin/unpin and fix some inconsistencies in gender neutral strings (#3952) 2017-06-26 13:04:36 +02:00
Eugen Rochko b90a44b6d0 Fix #3910 - Require OTP authentication to disable 2FA (#3935)
* Fix #3910 - Require OTP authentication to disable 2FA. Also, remove ability
to generate new OTP backup codes *after* initial backup codes were handed
out during activation

* Restore recovery code re-generation

* Improve display of some 2FA elements
2017-06-25 23:51:46 +02:00
Eugen Rochko ad531f90b1 Bind web UI access tokens to sessions (#3940)
* Add overview of active sessions

* Better display of browser/platform name

* Improve how browser information is stored and displayed for sessions overview

* Fix test

* Fix #2347 - Bind web UI access token to session

When you logout, session also destroys the access token, so it's no longer
valid. If access token is destroyed some other way, the session is also
destroyed, requiring a re-login.

Fix #1681 - Add scheduler to remove revoked access tokens and grants

* Fix test
2017-06-25 23:51:32 +02:00
Sorin Davidoi 2b1ab274fe fix(features/compose): Handle external changes to the textarea (#3632) 2017-06-25 21:43:27 +02:00
Eugen Rochko c465c5b3a8 Add overview of active sessions (#3929)
* Add overview of active sessions

* Better display of browser/platform name

* Improve how browser information is stored and displayed for sessions overview

* Fix test
2017-06-25 16:54:30 +02:00
PFM f4d0f6954e Fix "undefined" in className (#3939) 2017-06-25 16:02:56 +02:00
unarist 9a65f85934 Fix elephant in onboarding modal being very small sized on small devices (#3932) 2017-06-24 23:18:32 +02:00
unarist fdd982a562 Clean column collapsible (#3931)
* Remove unused column_collapsable.js
* Remove old styles
* Extract `> div`  style to independent class
2017-06-24 23:18:11 +02:00
Sorin Davidoi 8180d8bc35 feat(components/onboarding_modal): Swipe between pages (#3934) 2017-06-24 23:17:39 +02:00
Yamagishi Kazutoshi 6779ba5f18 Fix #3924 (regression from #3906) (#3925) 2017-06-24 12:24:02 +02:00
unarist 45058b5fde Use debounce for dispatch scrollTopNotification and expandNotifications (#3700) 2017-06-24 02:43:26 +02:00
Daniel Hunsaker 0c8f23b69f Fix a typo and give CW'd statuses the right cursor (#3918) 2017-06-23 23:13:27 +02:00
Yamagishi Kazutoshi e2027fbe42 Use Class and Property Decorators (#3730)
ref https://tc39.github.io/proposal-decorators/
2017-06-23 19:36:54 +02:00
Sorin Davidoi 1280559503 Revocable sessions (#3616)
* feat: Revocable sessions

* fix: Tests using sign_in

* feat: Configuration entry for the maximum number of session activations
2017-06-23 18:50:53 +02:00
Eugen Rochko 88458a1638 Merge branch 'swipe-gestures' of git://github.com/sorin-davidoi/mastodon into sorin-davidoi-swipe-gestures 2017-06-23 17:52:39 +02:00
Yamagishi Kazutoshi 539dbaa049 Remove unused variables (#3906) 2017-06-23 16:05:04 +02:00
Yamagishi Kazutoshi bc21ffd237 Add prefix to setting toggle ID (#3907) 2017-06-23 13:55:05 +02:00
Sorin Davidoi 9366672d53 fix: Apply :hover, :focus and :active only when multiple columns 2017-06-23 13:48:46 +02:00
Sorin Davidoi 501a3cf944 feat: Swipeable media 2017-06-23 13:48:46 +02:00
Sorin Davidoi 598bb06687 feat: Swipeable columns 2017-06-23 13:48:46 +02:00
Akihiko Odaki (@fn_aki@pawoo.net) 561ca10d86 Some minor change and spec for Account (#3813)
* Introduce domains method to Account relation

Account had followers_domains method, which was excessively specific.
Let relation of Account have domains method instead.

* Move follow_mapping in Account to AccountInteractions

* Introduce shared examples for AccountAvatar inclusion

* Cover Account more
2017-06-22 18:34:27 +02:00
Eugen Rochko e7810e4031 Fix regression from #3842 (#3892)
* Fix regression from #3842

Simplify the query by omitting all direct statuses. Private statuses
are allowed because they are from accounts we are following (so
by definition)

Resolves #3887 (alternative)

* Adjust test
2017-06-22 02:38:50 +02:00
unarist 66e14b3d3a Don't attach IntersectionObserver for wrapped statuses (#3883)
(This patch has been merged as bugfix and reverted, but still valuable as
improvement)

Previously, we've attached IntersectionObserver twice for boosted statuses:
wrapper Status and wrapped Status. but wrapped Status don't need to manage
intersection and visibility by itself, because it's a part of wrapper Status.
2017-06-21 06:47:36 +02:00
Eugen Rochko 65b46159ec Revert #3851 (#3878) 2017-06-21 01:37:15 +02:00
Eugen Rochko cbc0fea992 Revert "Don't attach IntersectionObserver for wrapped statuses" (#3877)
* Revert "Bump version to 1.4.4"

This reverts commit bd6bee29de.

* Revert "Fix conversations (fixes #3869) (#3870)"

This reverts commit ee7952c349.

* Revert "Fix streaming server. Redis connection subscribe for each channel. (#3828)"

This reverts commit 8f202bc639.

* Revert "Filter direct statuses in Status.as_home_timeline (#3842)"

This reverts commit 77dcf442e7.

* Revert "Fix RemoteFollow behavior (#3868)"

This reverts commit 1d2eba7a84.

* Revert "Update fabricator for MediaAttachment to attach a file according to type (#3862)"

This reverts commit baa248a801.

* Revert "Upgrade React Router (#3677)"

This reverts commit 9bc32eb267.

* Revert "Do not call setState from unmounted component (#3853)"

This reverts commit 59849b392d.

* Revert "Replace TextIconButton for SensitiveButton to IconButton (#3759)"

This reverts commit 47dceaded6.

* Revert "Fix RTL detection on Ruby side (#3867)"

This reverts commit 55376105f5.

* Revert "i18n: Fixed typo in Polish translation (#3864)"

This reverts commit 3c355ed26b.

* Revert "Don't attach IntersectionObserver for wrapped statuses (#3863)"

This reverts commit 79c04b0a2c.
2017-06-21 01:33:14 +02:00
ThibG ee7952c349 Fix conversations (fixes #3869) (#3870)
* Actually create conversations given explicit URIs

* Try to get the parent toot in before validation, to avoid creating a new conversation
2017-06-20 20:44:32 +02:00
Akihiko Odaki (@fn_aki@pawoo.net) 77dcf442e7 Filter direct statuses in Status.as_home_timeline (#3842)
The classes using Status.as_home_timeline, namely Feed and
PrecomputeFeedService are expected to filter direct statuses as
FanOutWriteService does, but their filtering were incomplete or missing.

This commit solves the problem by filtering direct statuses in
as_home_timeline as the other similar methods such as as_public_timeline
does.
2017-06-20 20:41:23 +02:00
unarist 1d2eba7a84 Fix RemoteFollow behavior (#3868)
* Invalid acct is an error. not "2 errors".
* Empty input should be different error from invalid acct
2017-06-20 20:40:56 +02:00
Sorin Davidoi 9bc32eb267 Upgrade React Router (#3677)
* chore(yarn): Remove react-router

* chore(yarn): Remove react-router-scroll

* chore(yarn): Remove history

* chore(yarn): Add react-router-dom

* chore: Remove usages of react-router-scroll

* refactor: Upgrade to react-router-web

* refactor: Use fork of react-router-scroll

This reverts commit 2ddea9a6c8d39fc64b7d0b587f3fbda7a45a7fa2.

* fix: Issues mentions in the PR feedback
2017-06-20 20:40:03 +02:00
alpaca-tc 59849b392d Do not call setState from unmounted component (#3853)
Stop an executing task if the component already unmounted.
2017-06-20 20:37:09 +02:00
Yamagishi Kazutoshi 47dceaded6 Replace TextIconButton for SensitiveButton to IconButton (#3759)
* Replace TextIconButton for SensitiveButton to IconButton

* line-height
2017-06-20 19:43:09 +02:00
unarist 55376105f5 Fix RTL detection on Ruby side (#3867)
This fixes below bugs:

* pipe characters being counted as RTL character
* only first word being checked
2017-06-20 18:45:09 +02:00
unarist 79c04b0a2c Don't attach IntersectionObserver for wrapped statuses (#3863)
This fixes a bug that sometimes boosted statuses being hidden on scrolling.

Previously, we've attached IntersectionObserver twice for boosted statuses:
wrapper Status and wrapped Status. This will call intersection handler twice,
so this may results race condition...probably.
2017-06-20 04:12:51 +02:00
unarist 9e5c733a66 Clicking on the CW text should expand the status (#3855) 2017-06-20 01:34:10 +02:00
unarist 8db07d1187 Set cursor:pointer only when necessary (#3857) 2017-06-19 18:27:07 +02:00
masarakki d947978192 setting-for-account-deletable (#3852) 2017-06-19 15:12:31 +02:00
Daigo 3 Dango 0483235216 Link to /about from public page on a single user instance (#3814)
There was no link for visitors to follow to see the about page.
2017-06-19 11:32:28 +02:00
Gô Shoemake 2d31077bdf Fix character/grapheme count stuff (#3839)
* Bring Toot button in line with counter

Both should use stringz I guess

* Use grapheme_length for character count
2017-06-19 11:31:14 +02:00
alpaca-tc 36049c0096 Unobserve status on unmount (#3851) 2017-06-19 11:29:57 +02:00
alpaca-tc fa14f245f8 Fixes streaming callbacks of HashtagTimeline (#3849) 2017-06-19 10:28:35 +02:00
Eugen Rochko 8bed91d94c Rename FollowRemoteAccountService to ResolveRemoteAccountService (#3847)
Rename Activitypub to ActivityPub
2017-06-19 01:51:04 +02:00
Eugen Rochko 4845069692 Debounce autosuggestions (#3836)
* Debounce autosuggestions

* Remove duplicate import
2017-06-19 01:50:56 +02:00
Nolan Lawson 424cf0a590 Fix jittery scrolling for Chromium browsers (#3776) (#3832) 2017-06-18 02:59:29 +02:00
Nolan Lawson f973d620ca handle resize in a debounce() (#3834) 2017-06-18 02:57:41 +02:00
nightpool 0048f7ac72 Whitelist allowed classes for federated statuses (#3810)
* Whitelist allowed classes for federated statuses

Allowed classes are currently:

 - Any microformats class (h/p/u/dt/e-*)
 - the classes mention, hashtag, ellipses and invisible.

this last one is somewhat suspect, but Mastodon currently uses it to render hidden link text.

resolved #3790

* Fix code style
2017-06-17 20:26:05 +02:00
abcang 3d49aa4bfb Fix ogp url (#3802) 2017-06-16 22:38:26 +02:00
Yamagishi Kazutoshi dd7fb41dbb Add alt attribute to ImageLoader (#3765) 2017-06-15 14:10:41 +02:00
ThibG dd67b9e049 Fix #3633 by not spawning RemoteProfileUpdateWorker from FetchRemoteAccountService (#3642) 2017-06-15 11:04:23 +02:00
Eugen Rochko 7181178007 Fix regression from #3490 - filter out hidden statuses from ancestors/descendants even if the viewer is anonymous (#3752) 2017-06-15 02:00:08 +02:00
Eugen Rochko 86211d3ca6 Fix regression from #3748 - properly set defaultColumns (#3750) 2017-06-14 23:07:06 +02:00
unarist 167ba4c5f7 Fix merge default columns (#3748)
mergeDeep also merges columns, but it should be replaced simply.

So in the new function, first apply mergeDeep except columns, and set default columns if columns unset.
2017-06-14 21:59:52 +02:00
Eugen Rochko c883e96d95 Fix account delete form not accepting password, update suspended (#3745)
account before removing content for quicker feedback to end-users
2017-06-14 20:30:12 +02:00
Eugen Rochko afefb364cb Save settings when they are changed (#3743) 2017-06-14 18:59:02 +02:00
Eugen Rochko 6f8f401ea1 Batched remove status service (#3735)
* Make Pubsubhubbub::DistributionWorker handle both single stream entry
arguments, as well as arrays of stream entries

* Add BatchedRemoveStatusService, make SuspendAccountService use it

* Improve method names

* Add test

* Add more tests

* Use PuSH payloads of 100 to have a clear mapping of
1000 input statuses -> 10 PuSH payloads

It was nice while it lasted
2017-06-14 18:01:35 +02:00
Eugen Rochko 1c7e2ddd65 Account deletion (#3728)
* Add form for account deletion

* If avatar or header are gone from source, remove them

* Add option to have SuspendAccountService remove user record, add tests

* Exclude suspended accounts from search
2017-06-14 18:01:27 +02:00
Eugen Rochko 973d6ef93a Fix #2619 - When redis feed is empty, fall back to database (#3721)
* Fix #2619 - When redis feed is empty, fall back to database

* Use redis value to return feed from database only while RegenerationWorker
hasn't finished running

* Fix specs

* Replace usage of reject!
2017-06-14 13:37:03 +02:00
Sorin Davidoi cf69bdc097 fix(status): Content jump due to height changes (#3734) 2017-06-13 20:46:21 +02:00
Eugen Rochko 9ba171309b Simplify getting started links localization. Link "powered by Mastodon" to joinmastodon.org (#3725) 2017-06-13 03:55:28 +02:00
Eugen Rochko 46af0c66b6 Fix #3675 - Adjust quality settings of converted GIFs to reduce filesize (#3723) 2017-06-13 00:51:48 +02:00
Eugen Rochko 91e13e3cf8 Fix unclickable onboardin modal regression (#3724) 2017-06-13 00:39:31 +02:00
m4sk1n 5b0518ada5 i18n: minor fix in Polish translation (#3726)
* i18n: minor fix in Polish translation

* i18n
2017-06-12 23:55:32 +02:00
Eugen Rochko 2deea77f2e Unread indicator was invisible behind column header, adjusted (#3720)
* Unread indicator was invisible behind column header, adjusted

* Unread indicator now a CSS pseudo-element

* Adjust flex
2017-06-12 20:02:17 +02:00
Ratmir Karabut a7426cd173 Update Russian translation (pin) (#3712)
* Update Russian translation (pin)
2017-06-12 12:53:20 +02:00
Yamagishi Kazutoshi ef29596d2d Regenerate defaultMessages.json (#3709)
follow up #3564
2017-06-12 12:41:19 +02:00
Yamagishi Kazutoshi 5f19b8e900 Re-add clear notifications button (#3708)
* Re-add clear notifications button

* remove connect() in column_settings

* one line

* remove unused props
2017-06-12 12:26:23 +02:00
Eugen Rochko 9cda14bd24 Fix regression from #3672 - Do not use pipeline around zscore (#3704) 2017-06-12 03:11:12 +02:00
ThibG 3af5774a71 Fix an error when TagManager.local_url? is called with a bad URI (#3701)
TagManager.local_url? was sometimes called with an URI with a nil host,
leading to a crash in TagManager.local_url?. This fixes moves the
already-existing uri.host.blank? check in front to avoid this case.
2017-06-11 22:53:12 +02:00
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
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
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 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
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