Commit Graph

4664 Commits (33b40397f88eef300294494f3c412fea6c44076d)

Author SHA1 Message Date
Yamagishi Kazutoshi 53145abfbf Allow admin to deactivate invite created by users (#5860) 2017-12-01 12:26:19 +01:00
mayaeh 9cb7c90412 Update Japanese translations for KeyboardShortcuts. (#5858) 2017-12-01 01:35:47 +01:00
Eugen Rochko cfe67ba832 Add semi-support for Video/Image objects in ActivityPub (#5848)
* Add semi-support for Video/Image objects in ActivityPub

Video and Image objects will create corresponding status records
with manually crafted text contents (title + URL)

* Extract html-url-finding logic into JsonLdHelper

* Fallback to id when url missing, extract supported object types
2017-11-30 04:06:20 +01:00
Eugen Rochko 2421fd745a Fix too many forwards (#5854)
* Avoid sending explicit Undo->Announce when original deleted

* Do not forward a reply back to the server that sent it

* Deduplicate inboxes of rebloggers' followers for delete forwarding

* Adjust test

* Fix wrong class, bad SQL, wrong variable, outdated comment
2017-11-30 03:50:05 +01:00
takayamaki dfceb51d93 add index on stream_entries table (#5793) 2017-11-30 03:35:54 +01:00
Mayu Laierlence a9413c2bb9 Fix Korean translation (#5853)
"어플리케이션" -> "애플리케이션"
2017-11-30 07:16:29 +09:00
Marcin Mikołajczak b95f1b130a i18n: 🇵🇱 (#5851)
Signed-off-by: Marcin Mikołajczak <me@m4sk.in>
2017-11-29 20:51:24 +09:00
mayaeh 598be148e7 Update Japanese translations. (#5844) 2017-11-29 15:41:21 +09:00
Yamagishi Kazutoshi d6846dce20 Show "expired" in invite index (#5838)
* Show "expired" in invite index

* "Force expire" -> "Deactivate"
2017-11-28 15:41:02 +01:00
aschmitz ce341c7cf6 Allow hiding of reblogs from followed users (#5762)
* Allow hiding of reblogs from followed users

This adds a new entry to the account menu to allow users to hide
future reblogs from a user (and then if they've done that, to show
future reblogs instead).

This does not remove or add historical reblogs from/to the user's
timeline; it only affects new statuses.

The API for this operates by sending a "reblogs" key to the follow
endpoint. If this is sent when starting a new follow, it will be
respected from the beginning of the follow relationship (even if
the follow request must be approved by the followee). If this is
sent when a follow relationship already exists, it will simply
update the existing follow relationship. As with the notification
muting, this will now return an object ({reblogs: [true|false]}) or
false for each follow relationship when requesting relationship
information for an account. This should cause few issues due to an
object being truthy in many languages, but some modifications may
need to be made in pickier languages.

Database changes: adds a show_reblogs column (default true,
non-nullable) to the follows and follow_requests tables. Because
these are non-nullable, we use the existing MigrationHelpers to
perform this change without locking those tables, although the
tables are likely to be small anyway.

Tests included.

See also <https://github.com/glitch-soc/mastodon/pull/212>.

* Rubocop fixes

* Code review changes

* Test fixes

This patchset closes #648 and resolves #3271.

* Rubocop fix

* Revert reblogs defaulting in argument, fix tests

It turns out we needed this for the same reason we needed it in muting:
if nil gets passed in somehow (most usually by an API client not passing
any value), we need to detect and handle it.

We could specify a default in the parameter and then also catch nil, but
there's no great reason to duplicate the default value.
2017-11-28 15:00:35 +01:00
ThibG f33fd11c87 Fix handling of temporary failures in ProcessMentionsService (#5842)
* Add test for temporary account resolving failures in ProcessMentionsService

* Fix processing of mentions to already-known remote accounts on temporary failures
2017-11-28 15:00:22 +01:00
Yamagishi Kazutoshi a132f4576d Refactor KeyboardShortcuts component (#5835) 2017-11-28 14:32:27 +01:00
nullkal 35e3791ba4 Fix account migration feature (#5837)
* Make removable account migration

* Fix error during update of account migration setting

* Add notice when update account migration setting
2017-11-28 14:31:23 +01:00
Marcin Mikołajczak 5f51992e16 i18n: 🇵🇱 (#5841)
Signed-off-by: Marcin Mikołajczak <me@m4sk.in>
2017-11-28 19:30:18 +09:00
Eugen Rochko 55d9abcceb Add UI for setting up account migration (#5832) 2017-11-27 22:47:06 +01:00
Joshua Wood 0b045ba7ab Add Keyboard Shortcuts Legend (#5823)
* Add Keyboard Shortcuts Legend

Adds a "Keyboard Shortcuts" legend (displayed in the rightmost column)
which is toggled via a new "?" hotkey. When subsequently pressed from
the Keyboard Shortcuts legend, "?" will navigate back to the previous
location.

* Add hidden table headings.

Makes the headings available for accessibility but hides them visually.
2017-11-27 21:31:58 +01:00
mayaeh 37f152b347 i18n: Update ja translation for consumable invites. (#5829)
* Add Japanese translation for consumable invites.

* Add Japanese translation.

* Update Japanese translation.
2017-11-27 20:23:14 +01:00
Sorin Davidoi 25cc0370f5 chore(yarn): Upgrade react-swipeable-views (smoother swiping) (#5830) 2017-11-27 20:22:47 +01:00
unarist 0d0ad983b7 Merge indexes for reblog on statuses table (#5831)
We added an index for `[account_id, reblog_of_id]`, but we already have a similar index for `reblog_of_id`. Those index will be bigger according to statuses count. For example, `reblog_of_id` index uses 800MB for 10GB statuses table.

So this patch swaps indexed columns like `[reblog_of_id, account_id]`, then it will covers both usage with single index.

Since those index creation may take a while, I've also disabled previous index creation.
2017-11-27 20:22:27 +01:00
Yamagishi Kazutoshi d5e4cb2ca1 Use account.username when display_name is empty (#5828) 2017-11-27 16:09:52 +01:00
Eugen Rochko bc8c951083 Add consumable invites (#5814)
* Add consumable invites

* Add UI for generating invite codes

* Add tests

* Display max uses and expiration in invites table, delete invite

* Remove unused column and redundant validator

- Default follows not used, probably bad idea
- InviteCodeValidator is redundant because RegistrationsController
  checks invite code validity

* Add admin setting to disable invites

* Add admin UI for invites, configurable role for invite creation

- Admin UI that lists everyone's invites, always available
- Admin setting min_invite_role to control who can invite people
- Non-admin invite UI only visible if users are allowed to

* Do not remove invites from database, expire them instantly
2017-11-27 16:07:59 +01:00
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
Yamagishi Kazutoshi 6a6e49d032 Change navigation link for moderators (#5812) 2017-11-25 05:53:54 +01: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
ysksn 4dd95c79a5 Add tests for Streamable (#5771) 2017-11-24 14:42:57 +01:00
abcang 17bde15f53 Add index of account and reblog to statuses (#5785) 2017-11-24 14:42:09 +01:00
ysksn 5dd8a36c09 Add tests for AccountRelationshipsPresenter (#5805) 2017-11-24 14:41:04 +01:00
mayaeh 9a930c0623 i18n: Update ja translations (#5804)
* Add Japanese translations.

* Update Japanese translations.

* Fix japanese translation.
2017-11-24 13:14:31 +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
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
Devon Blandin cbeb60ffc8 Disable Code Climate maintainability checks (#5798)
- Migrate `.codeclimate.yml` to version 2 structure
- Disable Code Climate [maintainability checks][]

https://docs.codeclimate.com/docs/advanced-configuration

[maintainability checks]: http://blog.codeclimate.com/blog/2017/10/12/10-point-technical-debt-assessment

This commit upgrades the Code Climate configuration file and disables
the new maintainability checks.

Once this PR is merged, we can experiment with the new checks via pull
requests (the PR will report new issues) or via the [Code Climate
CLI][cli], which [now also supports the new maintainability
checks][cli-support].

[cli]: https://github.com/codeclimate/codeclimate
[cli-support]: https://codeclimate.com/changelog/5a0e488824cfa902a300091c
2017-11-23 21:38:17 +01:00
SerCom_KC 97bb620b48 i18n: (zh-CN) Add translations for #5746 & #5735 (#5764) 2017-11-23 02:49:21 +01:00
mayaeh 9841d20c97 Add Japanese translations. (#5769) 2017-11-21 17:11:33 +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
ysksn 4086db0929 Add tests for Remotable (#5768) 2017-11-21 13:59:36 +09:00
abcang 4e409e629d Fixed duplicating URL of photo type of oEmbed (#5763) 2017-11-20 20:45:54 +01: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
mayaeh 52111769d0 i18n: Update ja translation for moderator badge. (#5731)
* Update Japanese translation for moderator badge.

* Follows English notation
2017-11-19 04:16:56 +01:00
ysksn 42cb1425c6 Add tests for AccountInteractions (#5751)
* Add tests for class methods of AccountInteractions

* Add tests for instance methods of AccountInteractions
2017-11-19 04:16:14 +01:00
Lynx Kotoura 8a8bea2e53 Remove translations of default theme (#5741) 2017-11-19 04:15:50 +01:00