Commit Graph

2662 Commits (63cb303a66901e24ec8f38447ee662905c4a1b17)

Author SHA1 Message Date
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
masarakki d8f136cb8b authorize-follow-requests-after-unlocking (#4658) 2017-08-26 12:40:03 +02:00
Yamagishi Kazutoshi dc19078b59 Fix missing at-sign (regression from #4688) (#4705) 2017-08-26 12:39:26 +02:00
Lynx Kotoura e0191a22c0 Fix ar.json (#4699)
Remove ! from compose_form.publish
2017-08-25 20:02:44 +02:00
nullkal f9ebff4b13 Allow multiple pinned statuses to be shown and make them be ordered b… (#4690)
* Allow multiple pinned statuses to be shown and make them be ordered by pinned date

* Set timestamps NOT NULL

* Make single-line pinned_statuses

* Spec for pinned_statuses

* Remove redundant empty line
2017-08-25 18:50:52 +02:00
unarist 4c8594d451 Apply user timezone for the title attribute of .time-ago (#4693) 2017-08-25 17:21:16 +02:00
Yamagishi Kazutoshi 5e3c6f63be Change timezone of the datetime to what browser specifies (#4688) 2017-08-25 17:21:00 +02:00
Lynx Kotoura 6dc5a20f99 Adjust styles of landing pages. (#4682)
* Adjust about.scss

* Delete trailing whitespace.
2017-08-25 17:19:35 +02:00
Quent-in 9e60ec3c7d i18n Updated strings (#4675 - pinned toot) (#4695)
* Added string for pinned toots

* Pinned toot #4675 + missing string

Somehow I deleted it "enabled_success"

* update after advice
2017-08-25 23:04:52 +09:00
Yamagishi Kazutoshi 5482e0d10e Add label for application scopes (#4691)
* Add label for application scopes

* hint
2017-08-25 13:03:26 +02:00
m4sk1n 8728b1b7c1 i18n: Update Polish translation #4675 (#4692)
Signed-off-by: Marcin Mikołajczak <me@m4sk.in>
2017-08-25 17:58:31 +09:00
Eugen Rochko 3e20cb7025 Pinned statuses (#4675)
* Pinned statuses

* yarn manage:translations
2017-08-25 01:41:18 +02:00
Ratmir Karabut 4850d6bd1e Update Russian translation (#4685)
* 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)
2017-08-25 07:11:06 +09:00
Damien Erambert 3fe19725b6 Don't load Roboto webfont when system font is used in the app (#4591)
* Don't load Roboto webfont when system font is used in the app

* remove trailing whitespace
2017-08-24 19:28:49 +02:00
Eugen Rochko cab7fa158a Add configuration to disable private status federation over PuSH (#4582) 2017-08-24 17:51:32 +02:00
unarist bab7127ac9 Fetch reblogs as Announce activity instead of Note object (#4672)
* Process Create / Announce activity in FetchRemoteStatusService

* Use activity URL in ActivityPub for reblogs

* Redirect to the original status on StatusesController#show
2017-08-24 16:21:42 +02:00
Eugen Rochko d44b84bebd Minor performance improvement for test suite (#4678) 2017-08-24 13:31:55 +02:00
Yamagishi Kazutoshi cd9586122d Remove eslint-disable comments (#4681)
Do not reject console.error and console.warn with ESLint rules.
2017-08-24 12:15:36 +02:00
Quent-in 62d93b1215 l18n update OC new strings (#4664) (#4680)
* New strings

* Update

Thin non breaking spaces

* Update

Thin non breaking spaces

* Update

Thin non breaking spaces
2017-08-24 16:16:32 +09:00
HIKARU KOBORI 771060a993 Fix typo in admin/status_controller.rb (#4679) 2017-08-24 04:03:52 +02:00
nullkal da85aff49c Use checkboxes for application scope setting (#4671) 2017-08-23 15:16:20 +02:00
unarist 75ce1235b5 Fix accessing to XML attribute in FetchAtomService (#4668) 2017-08-23 12:25:57 +02:00
Eugen Rochko b13501268f Fix up the applications area (#4664)
- Section it into "Development" area
- Improve UI of application form, index, and details
2017-08-23 00:59:35 +02:00
Daigo 3 Dango fd9d66dfd4 Add Mastodon::Source.url (#4643)
* Add Mastodon::Source.url

* Update spec

* Refactor

Move things frmo Mastodon::Source to Mastodon::Version
2017-08-22 22:54:19 +02:00
unarist 915eda7f88 Ignore empty response in ActivityPub::FetchRemoteStatusService (#4661)
* Ignore empty response in ActivityPub::FetchRemoteStatusService

This fixes `NoMethodError: undefined method `[]' for nil:NilClass` error.

* Check json.nil? in JsonLdHelper#supported_context?
2017-08-22 20:00:49 +02:00
Colin Mitchell 63b98318c5 Application prefs section (#2758)
* Add code for creating/managing apps to settings section

* Add specs for app changes

* Fix controller spec

* Fix view file I pasted over by mistake

* Add locale strings. Add 'my apps' to nav

* Add Client ID/Secret to App page. Add some visual separation

* Fix rubocop warnings

* Fix embarrassing typo

I lost an `end` statement while fixing a merge conflict.

* Add code for creating/managing apps to settings section

- Add specs for app changes
- Add locale strings. Add 'my apps' to nav
- Add Client ID/Secret to App page. Add some visual separation
- Fix some bugs/warnings

* Update to match code standards

* Trigger notification

* Add warning about not sharing API secrets

* Tweak spec a bit

* Cleanup fixture creation by using let!

* Remove unused key

* Add foreign key for application<->user
2017-08-22 18:33:57 +02:00
unarist 1cb7c1a273 Fix bugs which OStatus accounts may detected as ActivityPub ready (#4662)
* Fallback to OStatus in FetchAtomService

* Skip activity+json link if that activity is Person without inbox
* If unsupported activity was detected and all other URLs failed, retry with ActivityPub-less Accept header

* Allow mention to OStatus account in ActivityPub

* Don't update profile with inbox-less Person object
2017-08-22 18:30:15 +02:00
Eugen Rochko dccc1a74ad Support more variations of ActivityPub keyId in signature (#4630)
- Tries to avoid performing HTTP request if the keyId is an actor URI
- Likewise if the URI is a fragment URI on top of actor URI
- Resolves public key, returns owner if the owner links back to the key
2017-08-21 22:57:34 +02:00
Eugen Rochko 0268b334ae Periodically remove expired PuSH subscribers (#4654) 2017-08-21 22:56:33 +02:00
Lynx Kotoura 4730977e1a Increase contrast in landing pages (#4567)
* Increase contrast in about and about/more page

* Lighten em color in landing pages

* Increase contrast in landing pages


Fix about.scss
2017-08-21 21:59:03 +02:00
Eugen Rochko 672ee8219c Fix visual line-break glitch with .invisible parts of links (#4655) 2017-08-21 17:59:34 +02:00
Eugen Rochko d76bd63226 Do not try to re-subscribe to unsubscribed accounts (#4653) 2017-08-21 17:32:41 +02:00
abcang 8a4ac3f71c Refactoring streaming connections (#4645) 2017-08-21 15:04:34 +02:00
Yamagishi Kazutoshi 7503ada9b5 Use URI.join even when S3 enabled (#4652) 2017-08-21 12:42:16 +02:00
Eugen Rochko 1a19358b24 ActivityPub migration procedure (#4617)
* ActivityPub migration procedure

Once one account is detected as going from OStatus to ActivityPub,
invalidate WebFinger cache for other accounts from the same domain

* Unsubscribe from PuSH updates once we receive an ActivityPub payload

* Re-subscribe to PuSH unless already unsubscribed, regardless of protocol
2017-08-21 01:14:40 +02:00
m4sk1n cbc3b13ef6 i18n: Minor changes in Polish translation (#4649)
* i18n: Minor changes in Polish translation

* i18n: pl
2017-08-21 07:57:28 +09:00
Eugen Rochko 39b76d47a5 Fix #4637 - Re-add missing doorkeeper_authorize for /api/v1/verify_credentials (#4650) 2017-08-21 00:41:08 +02:00
Yamagishi Kazutoshi feb63b672e Remove status from favorites list when unfavorited (#4597) 2017-08-20 23:23:05 +02:00
unarist fe3240a160 Fix .information-board style for Safari (#4602)
flex-basis: 0 allows make flexbox smaller than its contents on Safari <10.

https://github.com/philipwalton/flexbugs#1-minimum-content-sizing-of-flex-items-not-honored
2017-08-20 20:45:44 +02:00
abcang 614ba8542c Fix hasUnread on HashtagTimeline (#4644) 2017-08-20 17:12:06 +02:00
Eugen Rochko 44b5084f1d Handle duplicate ActivityPub activities (#4639)
* Handle duplicate ActivityPub activities

Only perform side-effects when record processed for the first time

* Fast-forward repeat follow requests
2017-08-20 16:53:47 +02:00
takayamaki b6acec13d4 Improve about ja translation standalone.public_title (#4641) 2017-08-20 20:27:14 +09:00