Commit Graph

2769 Commits (e756c4f5ec4719b0fe41df77abea56dda317b491)

Author SHA1 Message Date
unarist dd6f9a1b82 Validate uri presence for remote status (#4985) 7 years ago
unarist 3f07f1b2b1 Raise an error on getting activity uri for remote status (#4984)
We had returned `nil` for that case, but this raises an error instead, as a wrong usage of the method.
This method is currently only used in ActivitySerializer.
7 years ago
abcang 44245926f1 Fix cancellation of scroll to the right (#4978) 7 years ago
unarist 1eab53ee10 Fix an error when actor json couldn't be fetched in ResolveRemoteAccountService (#4979)
* Fix an error when actor json couldn't be fetched in ResolveRemoteAccountService

* Add specs
7 years ago
BruWalfas 7be3131240 So Spanish. Much changes. Wow. (#4976) 7 years ago
Akihiko Odaki 198a9a4fa4 Remove local_only scope in Status (#4977) 7 years ago
unarist ec36df97c4 Escape URL parts on formatting local status (#4975) 7 years ago
Mingye Wang c8969dca35 Minor Chinese check & jsx addition (#4973)
* zh-*: transition from "like" back to "fav"

This commit reverts the translation for the yellow-star "fav" button
back to "fav" in Chinese. Some ambuiguity between "like" and "fav" is
deliberately used in zh-TW/HK by using the existing phrase "最爱"
(favorite (adj.), lit. love-most) instead of "收藏" (favourite (v.),
"collect") in some instances.

Fixes #3511.

* zh-*: apply suggestions for PR #4557

* zh-cn: de-monetize ya account

In Chinese two separate characters, 账 and 帐, can be used to spell the
word for account (账/帐户). However, the one with a 贝 on the left is
evolved from the latter specifically for monetary purposes. Since
people usually can't figure out which one to use, it might be a good
idea to use the original not-so-money one.

* zh-*: complete jsx translation
7 years ago
Lynx Kotoura 1e3b1d7211 Adjust landing pages 2 (#4967)
* Adjust landing pages 2

Fix styles of terms page
Remove action buttons from timeline in about page
Adjust styles of short description
Adjust form inputs
Set autocomplete off for username and email box in registration form. Remove line breakings.

* Revert removing action buttons
7 years ago
unarist 0698c610a6 Fix an error in ReplyDistributionWorker when replied status was deleted (#4974)
Reply distribution is proceed by Sidekiq, so replied status may be deleted before this.
7 years ago
ふぁぼ原 629fae8b3b correct URL pattern used in text length counter in WebUI (#4968) 7 years ago
unarist c30e6433de Fix AP serialization error when thread is missing (#4970)
`Status#reply?` may returns true even if the thread is missing.
e.g. the replied status was deleted or couldn't be fetched.

Then it raises NoMethodError on various AP json serialization.

This issue won't happen on Atom serialization because it checks thread
existence using `StreamEntry#threaded?` instead.
7 years ago
Naoki Kosaka cea5597722 Fix hasSize condition in secSet and sizes. (#4969) 7 years ago
Akihiko Odaki 48d77ea1eb Fix filterable_languages method of SettingsHelper (#4966) 7 years ago
Eugen Rochko 54edb4b853 When accessing uncached media attachment, redownload it (#4955)
* When accessing uncached media attachment, redownload it

* Prevent re-download of rejected media
7 years ago
unarist 6c81f9d6e5 Fix invisible load more button (#4962)
* Fix behavior while the button is invisible
e.g. pointer cursor, couldn't open contextmenu
* Avoid rendering the button to remove blank space if no more items are available or no items are rendered
7 years ago
Eugen Rochko 472df24579 When web UI URL used while logged out, redirect to static page (#4954) 7 years ago
Eugen Rochko 0d1215e82f Remove redundant width/height values from SVGs to fix Safari bug (#4956) 7 years ago
Anna e só e77cc032c2 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
7 years ago
sdukhovni 67559361e8 Add scheduled worker to purge old user IPs (#4951)
* Add scheduled worker to purge old user IPs

* Use ruby 1.9 hash syntax
7 years ago
ThibG 4a73615193 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
7 years ago
Yamagishi Kazutoshi bdcc9e2ceb Add missing Japanese translations (#4947) 7 years ago
ふぁぼ原 3816943e6b Enable to recognize most kinds of characters as URL paths (#4941) 7 years ago
Masoud Abkenar b39d512ade l10n: update Persian translation (#4946) 7 years ago
Eugen Rochko 04046a4983 Fix #4908 - Do not keep remote file names, generate random (#4934) 7 years ago
unarist a4c500176b Include requested URL into the message on network errors (#4945) 7 years ago
abcang 1aad015bbb Revert unique retry job (#4937)
* Revert "Enable UniqueRetryJobMiddleware even when called from sidekiq worker (#4836)"

This reverts commit 6859d4c028.

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

This reverts commit be7ffa2d75.
7 years ago
m4sk1n 94fba44eec 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
7 years ago
Jeroen 721460a59b Another Dutch language update (#4944)
* Update nl.json

* Update nl.yml

* Update nl.json
7 years ago
Naf 45b595cdca Add Japanese translate for #4911 (#4943) 7 years ago
Quent-in aad3df6afc 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
7 years ago
Eugen Rochko 596dab06e9 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
7 years ago
Eugen Rochko 4f0597d579 Give video player fluid max-width (#4935) 7 years ago
Eugen Rochko 2bbf987a0a 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
7 years ago
ThibG af00220d79 Fix refollowing (#4931)
* Make RefollowWorker ActivityPub-only to avoid potential identifier mismatches

* Don't call RefollowWorker on new accounts
7 years ago
Eugen Rochko 9239e4ce4d Uploads for admin site settings (#4913)
* Improve OpenGraph tags for about pages

* Add thumbnail admin setting

* Fix error

* Fix up
7 years ago
Jeroen 331263270b 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
7 years ago
MitarashiDango 283a5ec1a4 fix share intent. (#4926) 7 years ago
ThibG 550ff677da 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
7 years ago
nullkal da77f65c46 Add instance search feature (#4925) 7 years ago
nullkal 9e2ff3ef71 Make instance names in into links to user list in the instance (#4924) 7 years ago
Eugen Rochko b9d241c6f5 Fix #4917 - Add missing suspend checks (#4921) 7 years ago
Eugen Rochko 56af04dbb4 Fix #4918 - Limit pinned toots to 5 (#4923) 7 years ago
abcang 60944d5dca Fix height cache (#4909) 7 years ago
ThibG f29918e707 [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
7 years ago
unarist af10c9fbff 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
7 years ago
Eugen Rochko 8f8e677630 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
7 years ago
Eugen Rochko 4931eac280 Fix nil error for old toots that don't have a conversation (#4900) 7 years ago
Eugen Rochko 881856553e Fix #4894 - Merge context hash into final JSON hash after key transform (#4898) 7 years ago
Eugen Rochko 0a6b098668 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.
7 years ago
Eugen Rochko 0ef9d45d05 Fix error when following locked accounts (#4896) 7 years ago
unarist 47d48fed8d Reset preview image if avatar/header image selection was cancelled (#4893) 7 years ago
Anna e só c2bee07dbc 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
7 years ago
Masoud Abkenar a345479de2 l10n: update Persian translation (#4880)
* l10n: update Persian translation

* l10n: fix missing Persian translation
7 years ago
Eugen Rochko c450ddb613 Fix POST /api/v1/follows error when already following (#4878) 7 years ago
Eugen Rochko 72e662bb0d Hide modal loading screen for media/video/boost/confirm/actions modals (#4873) 7 years ago
Eugen Rochko 7d7844a47f 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)
7 years ago
Eugen Rochko f2cbfb2eb3 Fix dimensions of loading component for compose drawer (#4872) 7 years ago
Quent-in bc077018b8 i10n minors changes for 1.6 (#4867)
* wrong preposition + typo

* wrong preposition + typo

* Typo

* Typo

* minor changes

* minor changes
7 years ago
Eugen Rochko 90712d4293 Fix errors preventing UnsubscribeService from working (#4866) 7 years ago
Eugen Rochko 6867681c7c Add script to make embedded iframes autosize (#4853) 7 years ago
Eugen Rochko bdc8b4fd91 Disable mouse-based pause from #4859 (#4865)
It wasn't working ideally and introduced some annoying false positivies
7 years ago
unarist c7908e2d09 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
7 years ago
Yamagishi Kazutoshi c9d04f1c39 Fix second report (regression from 3b81baaaaf) (#4863) 7 years ago
Eugen Rochko 9e15eeec63 Add missing reject_media check before avatar download via ActivityPub (#4862) 7 years ago
Lynx Kotoura 3c45d3963a Scrollable tables in settings pages (#4857)
* Scrollable tables in settings pages

* Add space before curly brace
7 years ago
Eugen Rochko baa8b82179 Fix #1004 - Temporarily pause timeline if there's been recent mouse movement (#4859) 7 years ago
Eugen Rochko 4b460bc571 Fix #4852 - Check if already requested from FollowService (#4855) 7 years ago
Eugen Rochko 7ca173be47 Fix #4850 - When visibility missing from API call to toot, fallback to user preference (#4861) 7 years ago
unarist 1ae5d49a71 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.
7 years ago
unarist a12572e074 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`.
7 years ago
Quent-in dabc309ca3 i10n update OC and FR (#4849)
* Missing "navigation_bar.pins"

* Missing "navigation_bar.pins"
7 years ago
Eugen Rochko 1caf11ddcc 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
7 years ago
Eugen Rochko 95f018a3d4 "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
7 years ago
Eugen Rochko a4caa7eb62 Fetch statuses/following/followers numbers from ActivityPub collections (#4840) 7 years ago
m4sk1n 7c2d84910c i18n: Update Polish translation (#4845)
Signed-off-by: Marcin Mikołajczak <me@m4sk.in>
7 years ago
Quent-in b00cc4b9bd 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
7 years ago
Eugen Rochko dd6ede554f Fix #4834 - Adjust Status#local and Status#remote scopes (#4839) 7 years ago
PFM 7d853b514a Use <button> instead of <div role="button"> (#4835) 7 years ago
voidSatisfaction 85c7c42098 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
7 years ago
voidSatisfaction 8185f98872 Feat add validation for report comment: characters under 1000 valid (#4833) 7 years ago
Quent-in be75b13d68 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
7 years ago
Olivier Humbert 9417c9bb8f Update fr.json (#4830)
typo
7 years ago
Eugen Rochko 11bddd31ce Fix locking migration on statuses table. Nullable column and NO default value (#4825) 7 years ago
Eugen Rochko e7adbf572a 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
7 years ago
voidSatisfaction 13ffa3c59e 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
7 years ago
Masoud Abkenar aec5097d44 i18n: update Persian translation (#4822) 7 years ago
Clworld 1646f622a5 fix scroll position (#4821) 7 years ago
PFM d8d2a54741 fix text position of NSFW for video file (#4819) 7 years ago
Adam Thurlow 6994664a13 swift-enable the paperclip! 📎 (#2322) 7 years ago
abcang be7ffa2d75 Do not execute the job with the same arguments as the retry job (#4814) 7 years ago
Eugen Rochko e821c00e74 Fix mentions in direct statuses not being delivered via AP (#4806) 7 years ago
Eugen Rochko 9b994c4aee Fix #4794 - Fake instant follow in API response when account is believed unlocked (#4799) 7 years ago
Lynx Kotoura 4c3dd0b254 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
7 years ago
Eugen Rochko 9b50a9dd83 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
7 years ago
nullkal 2293466edd 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?
7 years ago
Eugen Rochko 09cffaaf04 Fix #4551 - Use correct syntax for content preloading (#4798) 7 years ago
abcang 334a633c2a Fix a problem that notification column goes to top (#4792) 7 years ago
Andreas Drop d3f46a77c3 Make german translation more gender neutral #4755 (#4789) 7 years ago
May Kittens Devour Your Soul 579c7a88e0 Croatian translation - updated (#4183)
* Update hr.json

* Update hr.json
7 years ago