Commit Graph

2803 Commits (43d1281d765ffb6947dfee73bffe501159b65074)

Author SHA1 Message Date
Eugen Rochko 2d1048d041 When web UI URL used while logged out, redirect to static page (#4954) 2017-09-15 00:57:08 +02:00
Eugen Rochko 43af63268c Remove redundant width/height values from SVGs to fix Safari bug (#4956) 2017-09-15 00:51:00 +02:00
Anna e só 584d2d8e02 l10n: PT-BR translation updated (#4953)
* devise.pt-BR.yml now fully translated

* pt-BR.json now fully translated

* pt-BR.yml partially translated; 46 lines left

* pt-BR.yml now fully translated

* simple_form.pt-BR.yml fully translated

* doorkeeper.pt-BR.yml now fully translated

* E-mail instructions on app/views/user_mailer added and fully translated

* PT-BR translation for #4871

* Deleted an unwanted caracter on pt-BR.yml

* Fixing typos on pt-BR.yml

* Added translation for Pinned toots tab on pt-BR.json

* Added missing translation for navigation_bar.pins

* Fixed spelling on pt-BR.yml

* Update pt-BR.json
2017-09-15 00:02:38 +02:00
sdukhovni 1fb5e3b009 Add scheduled worker to purge old user IPs (#4951)
* Add scheduled worker to purge old user IPs

* Use ruby 1.9 hash syntax
2017-09-14 22:26:38 +02:00
ThibG 67dd48a449 Fix race condition when receiving an ActivityPub Create multiple times (#4930)
* Fix race condition when receiving an ActivityPub Create multiple times

* Use a RedisLock to avoid concurrent processing of a same Create activity
2017-09-14 22:26:22 +02:00
Yamagishi Kazutoshi 175c2a9df2 Add missing Japanese translations (#4947) 2017-09-14 18:03:34 +02:00
ふぁぼ原 c71727ca55 Enable to recognize most kinds of characters as URL paths (#4941) 2017-09-14 18:03:20 +02:00
Masoud Abkenar d08cf543a3 l10n: update Persian translation (#4946) 2017-09-15 00:13:38 +09:00
Eugen Rochko 74626108b6 Fix #4908 - Do not keep remote file names, generate random (#4934) 2017-09-14 16:41:59 +02:00
unarist f7ae3f39f6 Include requested URL into the message on network errors (#4945) 2017-09-14 16:12:50 +02:00
abcang 579a7c2654 Revert unique retry job (#4937)
* Revert "Enable UniqueRetryJobMiddleware even when called from sidekiq worker (#4836)"

This reverts commit 0080804f44.

* Revert "Do not execute the job with the same arguments as the retry job (#4814)"

This reverts commit 892aeb7ffe.
2017-09-14 15:12:43 +02:00
m4sk1n 4d80e3c550 i18n: Update Polish translation (#4942)
* 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>

* Update pl.yml
2017-09-14 21:58:48 +09:00
Jeroen 8cd10e7df6 Another Dutch language update (#4944)
* Update nl.json

* Update nl.yml

* Update nl.json
2017-09-14 21:52:47 +09:00
Naf da2b2cfa70 Add Japanese translate for #4911 (#4943) 2017-09-14 18:20:04 +09:00
Quent-in 6279f70e60 l10n update OC/FR video redesign (#4938)
* l10n update for Redesign video player (#4911)

* Update videp

* Update

I hope this time format works well.

* One missing string

* Update time format

I'd like the complete name of the month in the Long format and the short one in the short format.
I hope it works now
2017-09-14 16:32:14 +09:00
Eugen Rochko 41d6ada41f Support OpenGraph video embeds (#4897)
* Support OpenGraph video embeds

It's not really OpenGraph, it's twitter:player property, but it's
not OEmbed so that fits. For example, this allows Twitch clips to
be displayed as embeds.

Also, fixes glitch-soc/mastodon#135

* Fix invalid OpenGraph cards being saved through attaching and
revisit URLs after 14 days
2017-09-14 04:11:36 +02:00
Eugen Rochko baa806794f Give video player fluid max-width (#4935) 2017-09-14 04:03:00 +02:00
Eugen Rochko fbec33df62 Redesign video player (#4911)
* Redesign video player

* Use new video player on static public pages too

* Use media gallery component on static public pages too

* Pause video when hiding it

* Full-screen sizing on WebKit

* Add aria labels to video player buttons

* Display link card on public status page

* Fix fullscreen from modal sizing issue

* Remove contain: strict property to fix fullscreen from columns
2017-09-14 03:39:10 +02:00
ThibG aaac0c5556 Fix refollowing (#4931)
* Make RefollowWorker ActivityPub-only to avoid potential identifier mismatches

* Don't call RefollowWorker on new accounts
2017-09-14 00:05:25 +02:00
Eugen Rochko 9ff429aa6d Uploads for admin site settings (#4913)
* Improve OpenGraph tags for about pages

* Add thumbnail admin setting

* Fix error

* Fix up
2017-09-14 00:04:30 +02:00
Jeroen 00b28a45b0 Updating Dutch translation (#4927)
* Update doorkeeper.nl.yml

* Update nl.yml

* Update simple_form.nl.yml

* Update nl.json

* Update en.json

* Update en.json

* Update nl.json
2017-09-13 23:12:29 +09:00
MitarashiDango 5d895c3988 fix share intent. (#4926) 2017-09-13 15:20:03 +02:00
ThibG 53a5e16c5f Fix ActivityPub handling of replies with WEB_DOMAIN (#4895) (#4904)
* Fix ActivityPub handling of replies when LOCAL_DOMAIN ≠ WEB_DOMAIN (#4895)

For all intents and purposes, `local_url?` is used to check if an URL refers
to the Web UI or the various API endpoints of the local instances. Those things
reside on `WEB_DOMAIN` and not `LOCAL_DOMAIN`.

* Change local_url? spec, as all URLs handled by Mastodon are based on WEB_DOMAIN
2017-09-13 14:22:16 +02:00
nullkal 7f432a97a0 Add instance search feature (#4925) 2017-09-13 12:30:07 +02:00
nullkal 405b24ca30 Make instance names in into links to user list in the instance (#4924) 2017-09-13 11:34:07 +02:00
Eugen Rochko 34f7c3de25 Fix #4917 - Add missing suspend checks (#4921) 2017-09-13 11:05:02 +02:00
Eugen Rochko a47a5ab5cd Fix #4918 - Limit pinned toots to 5 (#4923) 2017-09-13 11:04:32 +02:00
abcang 05c2d8ec3c Fix height cache (#4909) 2017-09-13 10:24:33 +02:00
ThibG 284c777b19 [WiP] Whenever a remote keypair changes, unfollow them and re-subscribe to … (#4907)
* Whenever a remote keypair changes, unfollow them and re-subscribe to them

In Mastodon (it could be different for other OStatus or AP-enabled software),
a keypair change is indicative of whole user (or instance) data loss. In this
situation, the “new” user might be different, and almost certainly has an empty
followers list. In this case, Mastodon instances will disagree on follower
lists, leading to unreliable delivery and “shadow followers”, that is users
believed by a remote instance to be followers, without the affected user
knowing.

Drawbacks of this change are:
1. If an user legitimately changes public key for some reason without losing
   data (not possible in Mastodon at the moment), they will have their remote
   followers unsubscribed/re-subscribed needlessly.
2. Depending of the number of remote followers, this may generate quite some
   traffic.
3. If the user change is an attempt at usurpation, the remote followers will
   unknowingly follow the usurper. Note that this is *not* a change of
   behavior, Mastodon already behaves like that, although delivery might be
   unreliable, and the usurper would not have known the former user's
   followers.

* Rename ResubscribeWorker to RefollowWorker

* Process followers in batches
2017-09-12 23:10:40 +02:00
unarist 94fdf7da70 Add section for protocol specific information on the admin page (#4910)
This PR adds section for protocol specific information, then always show
both of OStatus and ActivityPub. Specifically, this will help admins to
check PuSH subscription status and unsubscribe manually, even `protocol`
has been changed.

This also includes below changes:

* Add `overflow: hidden` to prevent float leaking
* Add missing fields for ActivityPub
2017-09-12 23:06:10 +02:00
Eugen Rochko d4fd2a39e6 Clean up and improve generated OpenGraph tags (#4901)
- Return all images as og:image
- Return videos as og:image (preview) and og:video
- Return profile:username on profiles
2017-09-12 05:39:38 +02:00
Eugen Rochko e46f2d995f Fix nil error for old toots that don't have a conversation (#4900) 2017-09-12 00:57:18 +02:00
Eugen Rochko f221fea176 Fix #4894 - Merge context hash into final JSON hash after key transform (#4898) 2017-09-12 00:16:18 +02:00
Eugen Rochko 703fd425ff Fix count numbers from ActivityPub not being saved (#4899)
They are marked as read-only by Rails, but we know what we are doing,
so we are un-marking them as such.

The mastodon:maintenance:update_counter_caches task is not really
supposed to be run anymore (it was a one-time thing during an upgrade)
however, just in case, I have modified it to not touch ActivityPub
accounts.

Also, no point writing to logger from these rake tasks, since they
are not to be run from cron. Better to give stdout feedback.
2017-09-12 00:16:03 +02:00
Eugen Rochko e054961051 Fix error when following locked accounts (#4896) 2017-09-11 23:50:37 +02:00
unarist b25c112d31 Reset preview image if avatar/header image selection was cancelled (#4893) 2017-09-11 16:19:54 +02:00
Anna e só d639474d8c l10n: Full PT-BR translation (#4882)
* devise.pt-BR.yml now fully translated

* pt-BR.json now fully translated

* pt-BR.yml partially translated; 46 lines left

* pt-BR.yml now fully translated

* simple_form.pt-BR.yml fully translated

* doorkeeper.pt-BR.yml now fully translated

* E-mail instructions on app/views/user_mailer added and fully translated

* PT-BR translation for #4871

* Deleted an unwanted caracter on pt-BR.yml

* Fixing typos on pt-BR.yml

* Added translation for Pinned toots tab on pt-BR.json

* Added missing translation for navigation_bar.pins
2017-09-11 08:40:29 +09:00
Masoud Abkenar 04183a9675 l10n: update Persian translation (#4880)
* l10n: update Persian translation

* l10n: fix missing Persian translation
2017-09-11 08:35:27 +09:00
Eugen Rochko 078c84fbb5 Fix POST /api/v1/follows error when already following (#4878) 2017-09-10 15:09:06 +02:00
Eugen Rochko 762ca653b6 Hide modal loading screen for media/video/boost/confirm/actions modals (#4873) 2017-09-10 10:26:01 +02:00
Eugen Rochko 6628ea4a82 Default follows for new users (#4871)
When a new user confirms their e-mail, bootstrap their home timeline
by automatically following a set of accounts. By default, all local
admin accounts (that are unlocked). Can be customized by new admin
setting (comma-separated usernames, local and unlocked only)
2017-09-10 09:58:38 +02:00
Eugen Rochko 63cb303a66 Fix dimensions of loading component for compose drawer (#4872) 2017-09-10 08:48:11 +02:00
Quent-in 899e7ad811 i10n minors changes for 1.6 (#4867)
* wrong preposition + typo

* wrong preposition + typo

* Typo

* Typo

* minor changes

* minor changes
2017-09-09 18:22:56 +02:00
Eugen Rochko 86cf6905cc Fix errors preventing UnsubscribeService from working (#4866) 2017-09-09 17:36:27 +02:00
Eugen Rochko 2303725f7d Add script to make embedded iframes autosize (#4853) 2017-09-09 16:23:44 +02:00
Eugen Rochko d8bbe7cf7c Disable mouse-based pause from #4859 (#4865)
It wasn't working ideally and introduced some annoying false positivies
2017-09-09 15:09:50 +02:00
unarist 64eb868c4a Fix scroll behavior and others on paused timeline (#4864)
Resolved:

* Lot of redundant renders while mouse moving
* Scroll jumping when timeline loaded
* Scroll position isn't kept when statuses below the scrollTop was deleted then new status arrived

Unresolved:

* Scroll position isn't kept when statuses over the scrollTop was deleted then new status arrived
-> It needs to know which statuses are over the scrollTop
* New status indicator should be active when new statuses arrived while mouse moved recently
-> It needs a) update indicator in ScrollableList, or b) set scrollTop status while mouse moving
2017-09-09 14:16:11 +02:00
Yamagishi Kazutoshi f551b2ca7a Fix second report (regression from 2cc31b3194) (#4863) 2017-09-09 13:42:48 +02:00
Eugen Rochko dfd9eed84c Add missing reject_media check before avatar download via ActivityPub (#4862) 2017-09-09 13:41:45 +02:00
Lynx Kotoura c268118e5b Scrollable tables in settings pages (#4857)
* Scrollable tables in settings pages

* Add space before curly brace
2017-09-09 02:26:58 +02:00
Eugen Rochko f79eba1650 Fix #1004 - Temporarily pause timeline if there's been recent mouse movement (#4859) 2017-09-09 02:26:41 +02:00
Eugen Rochko 1a5442204b Fix #4852 - Check if already requested from FollowService (#4855) 2017-09-09 02:02:44 +02:00
Eugen Rochko cc4bc2709d Fix #4850 - When visibility missing from API call to toot, fallback to user preference (#4861) 2017-09-09 02:02:29 +02:00
unarist d29f2a30e4 Refresh timeline after toot while the timeline is disconnected (#4858)
To reflect status posting immediately, we've inserted the status into timelines directly. However, status insertion changes "latest status", and it means next timeline refresh only fetches statuses since the inserted status. This behavior is very bad for disconnected timeline and mobile views.

After this patch, it refreshes timeline for disconnected timelines, instead of direct insertion.
2017-09-08 21:43:34 +02:00
unarist 05ef0ead4a Handle stream_entry URL correctly in ActivityPub (#4854)
In before, the method uses stream_entry id as status id, so replied status was wrongly selected.

This PR uses StatusFinder which was introduced with `Api::Web::EmbedsController`.
2017-09-08 18:20:03 +02:00
Quent-in df9c7584c9 i10n update OC and FR (#4849)
* Missing "navigation_bar.pins"

* Missing "navigation_bar.pins"
2017-09-08 13:55:47 +02:00
Eugen Rochko a27821f725 Fix language filter codes (#4841)
* Fix language filter codes

CLD3 returns BCP-47 language identifier, filter settings expect
identifiers in the ISO 639-1 format. Convert between formats,
and exclude duplicate languages from filter choices (zh-CN->zh)

* Fix zh name
2017-09-08 12:32:22 +02:00
Eugen Rochko 904ab54cf3 "Mute conversation" option on all own toots, not just in notifications (#4844)
That way you can mute notifications for a toot before you get replies
to it or boosts or favourites
2017-09-08 12:00:30 +02:00
Eugen Rochko 6fb8be482b Fetch statuses/following/followers numbers from ActivityPub collections (#4840) 2017-09-08 12:00:17 +02:00
m4sk1n 1a4beb3122 i18n: Update Polish translation (#4845)
Signed-off-by: Marcin Mikołajczak <me@m4sk.in>
2017-09-08 05:51:48 +09:00
Quent-in cbe9eb3f2e i10n OC / FR update Pinned toots (#4842)
* Added column.pins

New strings

* Added column.pins

* Update confirmation_instructions.oc.html.erb

* Update confirmation_instructions.oc.text.erb

* Update password_change.oc.html.erb

* Update password_change.oc.text.erb

* Update reset_password_instructions.oc.html.erb

* Update reset_password_instructions.oc.text.erb

* Update confirmation_instructions.oc.html.erb

* Update confirmation_instructions.oc.text.erb
2017-09-07 22:07:03 +02:00
Eugen Rochko 8bb036350a Fix #4834 - Adjust Status#local and Status#remote scopes (#4839) 2017-09-07 20:18:34 +02:00
PFM 3c816b0a77 Use <button> instead of <div role="button"> (#4835) 2017-09-07 16:18:41 +02:00
voidSatisfaction d766cb0c3c Add Pinned toot column (#4817)
* Add Pinned_toot_section

* Fix add frozen_string_literal

* Fix delete no need controller and tests

* Fix replace query strings to axios params

* Fix change value to accountId and disabling more button
2017-09-07 09:58:11 +02:00
voidSatisfaction ac63da7732 Feat add validation for report comment: characters under 1000 valid (#4833) 2017-09-07 09:55:42 +02:00
Quent-in e489378e22 i10n update OC and FR files (#4824)
* Onboarding: corrections

Some missing letters and spaces or better wording

* Embed

Translated as Intégrer in FR / Embarcar in OC
2017-09-07 08:55:03 +09:00
Olivier Humbert efef36447f Update fr.json (#4830)
typo
2017-09-06 22:32:49 +02:00
Eugen Rochko 5ad3153b0b Fix locking migration on statuses table. Nullable column and NO default value (#4825) 2017-09-06 20:57:52 +02:00
Eugen Rochko 73c613dcfc Switch to static URIs, new URI format in both protocols for new statuses (#4815)
* Decouple Status#local? from uri being nil

* Replace on-the-fly URI generation with stored URIs

- Generate URI in after_save hook for local statuses
- Use static value in TagManager when available, fallback to tag format
- Make TagManager use ActivityPub::TagManager to understand new format
- Adjust tests

* Use other heuristic for locality of old statuses, do not perform long query

* Exclude tombstone stream entries from Atom feed

* Prevent nil statuses from landing in Pubsubhubbub::DistributionWorker

* Fix URI not being saved (#4818)

* Add more specs for Status

* Save generated uri immediately

and also fix method order to minimize diff.

* Fix alternate HTML URL in Atom

* Fix tests

* Remove not-null constraint from statuses migration to speed it up
2017-09-06 19:01:28 +02:00
voidSatisfaction d4e8f77a8b Add Smartphone screen favourite back button and adjust styles (#4813)
* Feat add get-back button on favourite columnHeader

* Style adjust nice looking get-back button

* Fix delete media query and add padding right

* fix: restore padding and add lastchild style for back-button
2017-09-06 17:32:15 +02:00
Masoud Abkenar add644eeb0 i18n: update Persian translation (#4822) 2017-09-06 17:31:54 +02:00
Clworld ddf10f52a7 fix scroll position (#4821) 2017-09-06 17:29:56 +02:00
PFM 3c7f76265c fix text position of NSFW for video file (#4819) 2017-09-06 13:55:47 +02:00
Adam Thurlow 57a821d4b9 swift-enable the paperclip! 📎 (#2322) 2017-09-05 23:17:06 +02:00
abcang 892aeb7ffe Do not execute the job with the same arguments as the retry job (#4814) 2017-09-05 20:56:20 +02:00
Eugen Rochko 883a12cb0f Fix mentions in direct statuses not being delivered via AP (#4806) 2017-09-05 20:55:25 +02:00
Eugen Rochko 181cbbcaf8 Fix #4794 - Fake instant follow in API response when account is believed unlocked (#4799) 2017-09-05 17:48:13 +02:00
Lynx Kotoura 5a27eaae7c Adjust status embeds (#4808)
* Adjust status embeds

Adjust styles of embed code. Adjust styles of embed pages. Fix overflow of embed-modal.

* Remove trailing whitespace

* Using width from the variable
2017-09-05 12:31:24 +02:00
Eugen Rochko be4bfd2ec1 Fix some ActivityPub JSON bugs (#4796)
- Fix assumption that `url` is always a string. Handle it if it's an
  array of strings, array of objects, object, or string, both for
  accounts and for objects
- `sharedInbox` is actually supposed to be under `endpoints`, handle
  both cases and adjust the serializer
2017-09-04 18:26:33 +02:00
nullkal 36872cd22c Show pinned statuses only in the top of the profile page (#4803)
* Show pinned statuses only in the top of the profile page

* Refactor AccountsController#show_pinned_statuses?
2017-09-04 12:53:18 +02:00
Eugen Rochko ce3a71690b Fix #4551 - Use correct syntax for content preloading (#4798) 2017-09-04 02:14:12 +02:00
abcang 2434169c90 Fix a problem that notification column goes to top (#4792) 2017-09-03 20:31:51 +02:00
Andreas Drop 20c0118cad Make german translation more gender neutral #4755 (#4789) 2017-09-03 15:17:24 +02:00
May Kittens Devour Your Soul 9b20434874 Croatian translation - updated (#4183)
* Update hr.json

* Update hr.json
2017-09-03 18:10:53 +09:00
Quent-in 8d459da1f8 l10n Occitan update for Embed, cancel follow request, ... (#4788)
* Update: some missing strings

* Updates missing strings

* New string

* Update oc.json

* Update oc.yml

* Update oc.json
2017-09-03 18:08:37 +09:00
Eugen Rochko 8b4bddf1c9 Instantly upgrade account to ActivityPub if we receive ActivityPub payload (#4766) 2017-09-03 01:11:23 +02:00
Eugen Rochko abf2179b22 Improve client-side German i18n (#4785) 2017-09-02 23:21:48 +02:00
Eugen Rochko 8847d2fda4 Rename "locked" to "manuallyApprovesFollowers" in ActivityPub (#4779)
See: <https://www.w3.org/wiki/Activity_Streams_extensions#as:manuallyApprovesFollowers>
2017-09-02 23:13:35 +02:00
abcang d73174b629 Validate data of Imports (#4782) 2017-09-02 20:45:42 +02:00
m4sk1n e472b79b1e i18n: Improve Polish translation (#4783)
Signed-off-by: Marcin Mikołajczak <me@m4sk.in>
2017-09-02 20:45:20 +02:00
Eugen Rochko 23682c8593 Make "unfollow" undo pending outgoing follow request too (#4781)
* Make "unfollow" undo pending outgoing follow request too

* Add cancel button to web UI when awaiting follow request approval

* Make the hourglass button do the cancelling
2017-09-02 20:44:41 +02:00
PFM 6fcb8ac737 fix text position of NSFW in Safari (Mac/iPhone) (#4570) 2017-09-02 18:52:56 +02:00
unarist 34603e0154 Raise an error for remote url in StatusFinder (#4776)
* Raise an error for remote url in StatusFinder

Previous implementation had allowed remote url with status id which also exists on local.

Then that bug leads /api/web/embed to return wrong embed url.

* Fix oembed_controller_spec
2017-09-02 17:42:47 +02:00
unarist 11a09cdc59 Fix WebPush (regression from #4524) (#4778)
* Fix NoMethodError in Web::PushSubscription

```
undefined method `site_contact_email' for #<Class:0x00005976d13c40>

/usr/local/bundle/gems/activerecord-5.1.3/lib/active_record/dynamic_matchers.rb:22:in `method_missing'
/usr/local/bundle/gems/attr_encrypted-3.0.3/lib/attr_encrypted.rb:295:in `method_missing'
/usr/local/bundle/gems/attr_encrypted-3.0.3/lib/attr_encrypted/adapters/active_record.rb:129:in `method_missing_with_attr_encrypted'
/mastodon/app/models/web/push_subscription.rb:53:in `push_payload'
```

* Specify serializer in Web::NotificationSerializer
2017-09-02 16:50:42 +02:00
Surinna Curtis ed0798ec18 Don't unconditionally call `preventDefault` and `stopPropagation` on all keyup events (#4777)
* UploadArea should only preventDefault for Escape

This will make accessibility for some things less effortful, since we won't have to define a prior event handler to do whatever should be happening by default.

* Remove workaround for fixed bug in SettingToggle

SettingToggle was toggling itself in response to keydown of space, and then the keyup was doing it again
2017-09-02 16:27:16 +02:00
m4sk1n 139f297c01 i18n: Update Polish translation (#4775)
Signed-off-by: Marcin Mikołajczak <me@m4sk.in>
2017-09-02 16:25:54 +02:00
Lynx Kotoura f13b1b67f5 Adjust settings pages (#4765)
* views: Adjust heading positions

* Adjust settings pages

Adjust label. Adjust tables. Adjust admin/reports/* pages. Fix 2FA QR code style for narrow devices. Widen several pages. Increase contrast.

* Remove trailing whitespace
2017-09-02 15:49:28 +02:00
Yamagishi Kazutoshi 5a3e81e963 Add text color style for noscript link (#4772) 2017-09-02 14:02:15 +02:00
Yamagishi Kazutoshi 690e59b1f0 Fix profile page when use system's font (#4774) 2017-09-02 14:01:59 +02:00
Yamagishi Kazutoshi 3a21f6f4c4 Disable embed modal when private status (#4773)
* Disable embed modal when private status

* Remove `reblogDisabled`
2017-09-02 14:01:44 +02:00
Eugen Rochko 0aa744a8e3 Define missing JSON-LD properties (#4767)
Using _: property names is discouraged, as in the future,
canonicalization may throw an error when encountering that instead
of discarding it silently like it does now.

We are defining some ActivityStreams properties which we expect
to land in ActivityStreams eventually, to ensure that future versions
of Mastodon will remain compatible with this even once that happens.
Those would be `locked`, `sensitive` and `Hashtag`

We are defining a custom context inline for some properties which we
do not expect to land in any other context. `atomUri`, `inReplyToAtomUri`
and `conversation` are part of the custom defined OStatus context.
2017-09-02 14:01:23 +02:00
mayaeh 136c347b0b Add japanese translations for embed modal feature. (#4770) 2017-09-02 14:48:51 +09:00
Yamagishi Kazutoshi 7021b5f60c Add RoutingHelper (#4769) 2017-09-02 03:03:20 +02:00
m4sk1n 186416830e Add link to 'noscript' message (#4561)
* Add link to 'noscript' message

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

* remove indent
2017-09-02 01:52:28 +02:00
Eugen Rochko 23c149c5b9 Add ActivityPub handler for Delete->Actor activities (#4761) 2017-09-01 21:54:42 +02:00
Eugen Rochko 9ed764519b Finish up embed modal feature (#4759)
* Add embed button to dropdowns of in-timeline statuses

* yarn run manage:translations
2017-09-01 21:30:13 +02:00
Eugen Rochko 60ec86be49 Avoid sending some ActivityPub payloads if the receiver will get them through distribution (#4739) 2017-09-01 21:26:01 +02:00
Eugen Rochko e1a781476f Do not rely on activity arriving exactly once after delete arrived (#4754) 2017-09-01 21:12:59 +02:00
Cygnan b4c5d3e0bf Adjust padding on the public profile page (#4757)
* Fix a style issue on the public profile page for some mobile browsers

Signed-off-by: Cygnan <email@cygnan.com>

* Set padding-bottom to 20px

Signed-off-by: Cygnan <email@cygnan.com>
2017-09-01 21:01:23 +02:00
unarist 4c0dbcadfe Deduplicate with local status on Create activity (#4763) 2017-09-01 21:00:43 +02:00
Eugen Rochko 966e05ced2 Fix NoMethodError (#4762) 2017-09-01 20:50:42 +02:00
Eugen Rochko e9e271878e Make PreviewCard records reuseable between statuses (#4642)
* Make PreviewCard records reuseable between statuses

**Warning!** Migration truncates preview_cards tablec

* Allow a wider thumbnail for link preview, display it in horizontal layout (#4648)

* Delete preview cards files before truncating

* Rename old table instead of truncating it

* Add mastodon:maintenance:remove_deprecated_preview_cards

* Ignore deprecated_preview_cards in schema definition

* Fix null behaviour
2017-09-01 16:20:16 +02:00
Yamagishi Kazutoshi 8d4e705cb0 Use system's default font on non web UI pages (#4553)
* Use system's default font on non web UI pages

* Remove import for Redirect
2017-09-01 16:13:31 +02:00
Eugen Rochko c3b7e7529a Make first use less overwhelming with browser permissions (#4760)
- Ask for desktop notifications after 1 minute of use instead of
  instantly
- Ask for protocol handler permission after 5 minutes of use
  instead of instantly
2017-09-01 16:07:08 +02:00
Damien Erambert ce91ed1322 Update FR locales (#4714)
* Make the fr locales up-to-date with the last changes (new profile view, applications)

* Use the same wording for toots in fr.yml and fr.json

* Translate the pin related strings

* Translate pin-related locales on the front-end

* Add missing locales in doorkeeper.fr.yml and remove un-used ones

* Change "posts" back to "status" in the /about/more page in fr.yml

* Fix typos for "status" in fr.yml

* fix typo for "status" in fr.json

* Remove duplicate string

* Non-breaking space before punctuation

* 'Better' translation for "unpin"

* Put back 'pouet' where it was already

* Fix

* Fix
2017-09-01 14:09:01 +02:00
Eugen Rochko 2bbb10a186 Refactor Web::PushSubscription, remove welcome message (#4524)
* Refactor Web::PushSubscription, remove welcome message

* Add missing helper

* Use locale of the receiver on push notifications (#4519)

* Remove unused translations

* Fix dir on notifications
2017-09-01 13:35:23 +02:00
unarist 5765b930d6 Convert OStatus tag to ActivityPub id on in_reply_to resolution (#4756) 2017-09-01 13:34:04 +02:00
unarist ee591d23b5 Fallback from perform_via_activitypub on private posts (#4758)
Currently, private / direct posts via OStatus from AP compatible instance will be dropped due to failing to fetch AP version.

So this fallbacks to OStatus handling:

* when failed to fetch ActivityPub version
* when status is neither :public nor :unlisted
2017-09-01 12:33:02 +02:00
Eugen Rochko 02bd661d76 Remove identity context from output of LinkedDataSignature (#4753) 2017-08-31 21:32:09 +02:00
unarist 5a6b15f014 Don't process ActivityPub payload if signature is invalid (#4752)
* Don't process ActivityPub payload if signature is invalid

* Fix style issue
2017-08-31 17:18:49 +02:00
James 2fbae21f05 Guarantee Subscription service first account has proper URL details (#4732)
* Guarantee Subscription service first account has proper URL details

Subscription Service potentially could break if the first user suspended
themselves, creating a situation where the urls that populate throughout
subscription service's PuSH request would cause the remote API to throw 503 errors.

Guaranteeing that the first account picked is not suspended prevents this problem.

* Fix style issue
2017-08-31 15:44:00 +02:00
Akihiko Odaki 3b8a64e94e Fix the usages of Detect Passive Events (#4749) 2017-08-31 11:20:54 +02:00
Eugen Rochko ad769409f7 Embed modal (#4748)
* Embed modal

* Proxy OEmbed requests from web UI
2017-08-31 03:38:35 +02:00
Eugen Rochko 1b20fe79b4 Add sharedInbox to actors (#4737) 2017-08-31 00:02:59 +02:00
MitarashiDango a7400f8016 error fixed (when loading pages in single column mode.) (#4746) 2017-08-30 17:30:25 +02:00
Eugen Rochko ca76d11434 Forward ActivityPub creates that reply to local statuses (#4709)
* Forward ActivityPub creates that reply to local statuses

* Fix test

* Fix wrong signers
2017-08-30 15:37:02 +02:00
Yamagishi Kazutoshi 9545ab8371 Add close tag of iframe for oEmbed response (#4745)
* Add close tag of iframe for oEmbed response

* add comma
2017-08-30 14:03:17 +02:00
nullkal fe417663d9 Use request.remote_ip instead of request.ip (#4744) 2017-08-30 10:24:30 +02:00
Eugen Rochko 651c659fd6 Update status embeds (#4742)
- Use statuses controller for embeds instead of stream entries controller
- Prefer /@:username/:id/embed URL for embeds
- Use /@:username as author_url in OEmbed
- Add follow link to embeds which opens web intent in new window
- Use redis cache in development
- Cache entire embed
2017-08-30 10:23:43 +02:00
abcang e8e6bb5437 Scroll smoothly to the right (#4735) 2017-08-29 17:06:19 +02:00
MitarashiDango 5a1614ce9b fix error when single columns mode. (#4734) 2017-08-29 16:11:28 +02:00
Eugen Rochko 3135d20283 Serialize ActivityPub alternate link into OStatus deletes, handle it (#4730)
Requires moving Atom rendering from DistributionWorker (where
`stream_entry.status` is already nil) to inline (where
`stream_entry.status.destroyed?` is true) and distributing that.

Unfortunately, such XML renderings can no longer be easily chained
together into one payload of n items.
2017-08-29 16:11:05 +02:00
Akihiko Odaki 46142a58d2 Do not scroll the columns area due to redirection (#4541)
Commit c4a21aa352 scrolls the columns area
when the route changes since the user is likely to want to see the
rightmost column in such cases.

However, redirection is automatic and does not indicate users' intension.
Do not scroll the columns area due to one.
2017-08-29 14:16:21 +02:00
abcang 4ce06cc0c9 Generalized the infinite scrollable list (#4697) 2017-08-28 22:23:44 +02:00
unarist 9edbeec86c Fix Delete activity handling when the status has been reblogged (#4729) 2017-08-28 22:08:11 +02:00
unarist e17945907a Fix deletion of status which has been reblogged (#4728) 2017-08-28 21:38:59 +02:00
abcang 4fb007764b rescue HTTP::ConnectionError in RemoteFollowController#create (#4726) 2017-08-28 19:12:09 +02:00
Lynx Kotoura 5c10e23880 Adjust "signed in as" pages (#4720)
* Adjust "signed in as" pages


Fix min-width


Set width of .account-header .name

To apply text-overflow and overflow settings
Set overflow for detailed-status__display-name

* Remove trailing whitespace
2017-08-28 00:01:07 +02:00
Lynx Kotoura ce5055cbe2 Adjust public profile pages (#4713)
* Adjust account-grid in public profiles

Full-width card on mobile UI. Set break-word for long name and ID. Fix margin.

* Reduce padding-bottom of public profiles

* Revive next prev buttons in mobile public profiles

In followers followees pages.

* Revert break-word for username

* Fix overflow of display_name

Need re-setting text-overflow and overflow in display: block;
2017-08-27 23:59:51 +02:00
Eugen Rochko 007d26852d Shorten display of large numbers on public profiles (#4711) 2017-08-27 17:04:45 +02:00
mayaeh 9b75d0e730 Add japanese translations for Pinned statuses based on pawoo. (#4717)
Add japanese translations for pin_errors.
2017-08-28 00:03:27 +09:00
Eugen Rochko 62c8ce278c Adjust RTL styles (#4712) 2017-08-27 13:35:18 +02:00
unarist 8f561fb7bf Allow Symbol keyed Hash in LinkedDataSignature (#4715)
SerializarbleResource#as_json serializes to Symbol keyed Hash, but current
implementation of LinkedDataSignature expects String keyed Hash.

So it generates broken payload.
2017-08-27 13:35:01 +02:00
Eugen Rochko 94ba76455e Add _:inReplyToAtomUri to ActivityPub (#4702) 2017-08-26 19:55:10 +02:00
Eugen Rochko c423a3463b Forward ActivityPub deletes to followers of rebloggers (#4706) 2017-08-26 18:52:53 +02:00
Eugen Rochko b2e1379427 Use Tombstone and _:atomUri in Delete activities as fallback (#4704) 2017-08-26 16:10:35 +02:00
Eugen Rochko 6025762ba2 Add ActivityPub serializer for Undo of Announce (#4703) 2017-08-26 15:32:40 +02:00
Lynx Kotoura 1914a8b8a8 Set margin between character-counter and compose-form__buttons (#4698)
For some languages publish translation is long.
2017-08-26 14:23:20 +02:00
Eugen Rochko 5147147da9 Add handling of Linked Data Signatures in payloads (#4687)
* Add handling of Linked Data Signatures in payloads

* Add a way to sign JSON, fix canonicalization of signature options

* Fix signatureValue encoding, send out signed JSON when distributing

* Add missing security context
2017-08-26 13:47:38 +02:00
Anna e só dd72c55902 Added new translations of error messages, block and mute domains and users, privacy disclaimers, etc (#4700)
* Added new translations of error messages, block and mute domains and users

* Added new translations of error messages, block and mute domains and users
2017-08-26 20:45:35 +09:00