diff --git a/.haml-lint.yml b/.haml-lint.yml
index e493afb85f..74d243a3ad 100644
--- a/.haml-lint.yml
+++ b/.haml-lint.yml
@@ -1,6 +1,5 @@
exclude:
- 'vendor/**/*'
- - lib/templates/haml/scaffold/_form.html.haml
require:
- ./lib/linter/haml_middle_dot.rb
diff --git a/Gemfile.lock b/Gemfile.lock
index 3508ad8d54..3de5ab5c7c 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -198,7 +198,7 @@ GEM
irb (~> 1.10)
reline (>= 0.3.8)
debug_inspector (1.2.0)
- devise (4.9.3)
+ devise (4.9.4)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0)
@@ -456,7 +456,7 @@ GEM
net-smtp (0.4.0.1)
net-protocol
nio4r (2.7.1)
- nokogiri (1.16.3)
+ nokogiri (1.16.4)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nsa (0.3.0)
@@ -607,7 +607,7 @@ GEM
redlock (1.3.2)
redis (>= 3.0.0, < 6.0)
regexp_parser (2.9.0)
- reline (0.5.0)
+ reline (0.5.1)
io-console (~> 0.5)
request_store (1.5.1)
rack (>= 1.4)
diff --git a/app/controllers/concerns/cache_concern.rb b/app/controllers/concerns/cache_concern.rb
index 62f763fe2f..4656539f85 100644
--- a/app/controllers/concerns/cache_concern.rb
+++ b/app/controllers/concerns/cache_concern.rb
@@ -46,27 +46,19 @@ module CacheConcern
end
end
+ # TODO: Rename this method, as it does not perform any caching anymore.
def cache_collection(raw, klass)
- return raw unless klass.respond_to?(:with_includes)
+ return raw unless klass.respond_to?(:preload_cacheable_associations)
- raw = raw.cache_ids.to_a if raw.is_a?(ActiveRecord::Relation)
- return [] if raw.empty?
+ records = raw.to_a
- cached_keys_with_value = Rails.cache.read_multi(*raw).transform_keys(&:id)
+ klass.preload_cacheable_associations(records)
- uncached_ids = raw.map(&:id) - cached_keys_with_value.keys
-
- klass.reload_stale_associations!(cached_keys_with_value.values) if klass.respond_to?(:reload_stale_associations!)
-
- unless uncached_ids.empty?
- uncached = klass.where(id: uncached_ids).with_includes.index_by(&:id)
- Rails.cache.write_multi(uncached.values.to_h { |i| [i, i] })
- end
-
- raw.filter_map { |item| cached_keys_with_value[item.id] || uncached[item.id] }
+ records
end
+ # TODO: Rename this method, as it does not perform any caching anymore.
def cache_collection_paginated_by_id(raw, klass, limit, options)
- cache_collection raw.cache_ids.to_a_paginated_by_id(limit, options), klass
+ cache_collection raw.to_a_paginated_by_id(limit, options), klass
end
end
diff --git a/app/helpers/context_helper.rb b/app/helpers/context_helper.rb
index 412be4f48d..d70b2a88fd 100644
--- a/app/helpers/context_helper.rb
+++ b/app/helpers/context_helper.rb
@@ -49,13 +49,11 @@ module ContextHelper
end
def serialized_context(named_contexts_map, context_extensions_map)
- context_array = []
-
named_contexts = named_contexts_map.keys
context_extensions = context_extensions_map.keys
- named_contexts.each do |key|
- context_array << NAMED_CONTEXT_MAP[key]
+ context_array = named_contexts.map do |key|
+ NAMED_CONTEXT_MAP[key]
end
extensions = context_extensions.each_with_object({}) do |key, h|
diff --git a/app/javascript/mastodon/common.js b/app/javascript/mastodon/common.js
index 0ec8449343..511568aa0f 100644
--- a/app/javascript/mastodon/common.js
+++ b/app/javascript/mastodon/common.js
@@ -2,7 +2,7 @@ import Rails from '@rails/ujs';
import 'font-awesome/css/font-awesome.css';
export function start() {
- require.context('../images/', true);
+ require.context('../images/', true, /\.(jpg|png|svg)$/);
try {
Rails.start();
diff --git a/app/javascript/mastodon/locales/ar.json b/app/javascript/mastodon/locales/ar.json
index a231e5e21d..dd13f10aa3 100644
--- a/app/javascript/mastodon/locales/ar.json
+++ b/app/javascript/mastodon/locales/ar.json
@@ -92,6 +92,11 @@
"block_modal.remote_users_caveat": "Do t’i kërkojmë shërbyesit {domain} të respektojë vendimin tuaj. Por, pajtimi s’është i garantuar, ngaqë disa shërbyes mund t’i trajtojnë ndryshe bllokimet. Psotimet publike mundet të jenë ende të dukshme për përdorues pa bërë hyrje në llogari.",
"block_modal.show_less": "اعرض أقلّ",
"block_modal.show_more": "أظهر المزيد",
+ "block_modal.they_cant_mention": "لن يستطيع ذِكرك أو متابعتك.",
+ "block_modal.they_cant_see_posts": "لن يستطيع رؤية منشوراتك ولن ترى منشوراته.",
+ "block_modal.they_will_know": "يمكنه أن يرى أنه قد تم حجبه.",
+ "block_modal.title": "أتريد حظر المستخدم؟",
+ "block_modal.you_wont_see_mentions": "لن تر المنشورات التي يُشار فيهم إليه.",
"boost_modal.combo": "يُمكنك الضّغط على {combo} لتخطي هذا في المرة المُقبلة",
"bundle_column_error.copy_stacktrace": "انسخ تقرير الخطأ",
"bundle_column_error.error.body": "لا يمكن تقديم الصفحة المطلوبة. قد يكون بسبب خطأ في التعليمات البرمجية، أو مشكلة توافق المتصفح.",
@@ -172,6 +177,7 @@
"confirmations.delete_list.message": "هل أنتَ مُتأكدٌ أنكَ تُريدُ حَذفَ هذِهِ القائمة بشكلٍ دائم؟",
"confirmations.discard_edit_media.confirm": "تجاهل",
"confirmations.discard_edit_media.message": "لديك تغييرات غير محفوظة لوصف الوسائط أو معاينتها، أتريد تجاهلها على أي حال؟",
+ "confirmations.domain_block.confirm": "حظر الخادم",
"confirmations.domain_block.message": "متأكد من أنك تود حظر اسم النطاق {domain} بالكامل ؟ في غالب الأحيان يُستَحسَن كتم أو حظر بعض الحسابات بدلا من حظر نطاق بالكامل.\nلن تتمكن مِن رؤية محتوى هذا النطاق لا على خيوطك العمومية و لا في إشعاراتك. سوف يتم كذلك إزالة كافة متابعيك المنتمين إلى هذا النطاق.",
"confirmations.edit.confirm": "تعديل",
"confirmations.edit.message": "التعديل في الحين سوف يُعيد كتابة الرسالة التي أنت بصدد تحريرها. متأكد من أنك تريد المواصلة؟",
@@ -203,6 +209,16 @@
"dismissable_banner.explore_statuses": "هذه هي المنشورات الرائجة على الشبكات الاجتماعيّة اليوم. تظهر المنشورات المعاد نشرها والحائزة على مفضّلات أكثر في مرتبة عليا.",
"dismissable_banner.explore_tags": "هذه هي الوسوم تكتسب جذب الاهتمام حاليًا على الويب الاجتماعي. الوسوم التي يستخدمها مختلف الناس تحتل مرتبة عليا.",
"dismissable_banner.public_timeline": "هذه هي أحدث المنشورات العامة من الناس على الشبكة الاجتماعية التي يتبعها الناس على {domain}.",
+ "domain_block_modal.block": "حظر الخادم",
+ "domain_block_modal.block_account_instead": "أحجب @{name} بدلاً من ذلك",
+ "domain_block_modal.they_can_interact_with_old_posts": "يمكن للأشخاص من هذا الخادم التفاعل مع منشوراتك القديمة.",
+ "domain_block_modal.they_cant_follow": "لا أحد من هذا الخادم يمكنه متابعتك.",
+ "domain_block_modal.they_wont_know": "لن يَعرف أنه قد تم حظره.",
+ "domain_block_modal.title": "أتريد حظر النطاق؟",
+ "domain_block_modal.you_will_lose_followers": "سيتم إزالة جميع متابعيك من هذا الخادم.",
+ "domain_block_modal.you_wont_see_posts": "لن ترى منشورات أو إشعارات من المستخدمين على هذا الخادم.",
+ "domain_pill.activitypub_lets_connect": "يتيح لك التواصل والتفاعل مع الناس ليس فقط على ماستدون، ولكن عبر تطبيقات اجتماعية مختلفة أيضا.",
+ "domain_pill.activitypub_like_language": "إنّ ActivityPub مثل لغة ماستدون التي يتحدث بها مع شبكات اجتماعية أخرى.",
"domain_pill.server": "الخادِم",
"domain_pill.their_handle": "مُعرِّفُه:",
"domain_pill.their_server": "بيتهم الرقمي، حيث تُستضاف كافة منشوراتهم.",
@@ -276,6 +292,7 @@
"filter_modal.select_filter.subtitle": "استخدم فئة موجودة أو قم بإنشاء فئة جديدة",
"filter_modal.select_filter.title": "تصفية هذا المنشور",
"filter_modal.title.status": "تصفية منشور",
+ "filtered_notifications_banner.title": "الإشعارات المصفاة",
"firehose.all": "الكل",
"firehose.local": "هذا الخادم",
"firehose.remote": "خوادم أخرى",
@@ -666,6 +683,7 @@
"status.direct": "إشارة خاصة لـ @{name}",
"status.direct_indicator": "إشارة خاصة",
"status.edit": "تعديل",
+ "status.edited": "آخر تعديل يوم {date}",
"status.edited_x_times": "عُدّل {count, plural, zero {} one {مرةً واحدة} two {مرّتان} few {{count} مرات} many {{count} مرة} other {{count} مرة}}",
"status.embed": "إدماج",
"status.favourite": "فضّل",
diff --git a/app/javascript/mastodon/locales/bg.json b/app/javascript/mastodon/locales/bg.json
index 910d6cb06e..2acedbc4d1 100644
--- a/app/javascript/mastodon/locales/bg.json
+++ b/app/javascript/mastodon/locales/bg.json
@@ -298,6 +298,7 @@
"filter_modal.select_filter.title": "Филтриране на публ.",
"filter_modal.title.status": "Филтриране на публ.",
"filtered_notifications_banner.pending_requests": "Известията от {count, plural, =0 {никого, когото може да познавате} one {едно лице, което може да познавате} other {# души, които може да познавате}}",
+ "filtered_notifications_banner.private_mentions": "{count, plural, one {частно споменаване} other {частни споменавания}}",
"filtered_notifications_banner.title": "Филтрирани известия",
"firehose.all": "Всичко",
"firehose.local": "Този сървър",
diff --git a/app/javascript/mastodon/locales/ca.json b/app/javascript/mastodon/locales/ca.json
index 37990cdb2e..6f0dd93760 100644
--- a/app/javascript/mastodon/locales/ca.json
+++ b/app/javascript/mastodon/locales/ca.json
@@ -705,7 +705,7 @@
"status.edited_x_times": "Editat {count, plural, one {{count} vegada} other {{count} vegades}}",
"status.embed": "Incrusta",
"status.favourite": "Favorit",
- "status.favourites": "{count, plural, one {# favorit} other {# favorits}}",
+ "status.favourites": "{count, plural, one {favorit} other {favorits}}",
"status.filter": "Filtra aquest tut",
"status.filtered": "Filtrada",
"status.hide": "Amaga el tut",
@@ -726,7 +726,7 @@
"status.reblog": "Impulsa",
"status.reblog_private": "Impulsa amb la visibilitat original",
"status.reblogged_by": "impulsat per {name}",
- "status.reblogs": "{count, plural, one {# impuls} other {# impulsos}}",
+ "status.reblogs": "{count, plural, one {impuls} other {impulsos}}",
"status.reblogs.empty": "Encara no ha impulsat ningú aquest tut. Quan algú ho faci, apareixerà aquí.",
"status.redraft": "Esborra i reescriu",
"status.remove_bookmark": "Elimina el marcador",
diff --git a/app/javascript/mastodon/locales/de.json b/app/javascript/mastodon/locales/de.json
index b1d0b3ec14..5a5acb3835 100644
--- a/app/javascript/mastodon/locales/de.json
+++ b/app/javascript/mastodon/locales/de.json
@@ -85,7 +85,7 @@
"alert.rate_limited.message": "Bitte versuche es nach {retry_time, time, medium} erneut.",
"alert.rate_limited.title": "Anfragelimit überschritten",
"alert.unexpected.message": "Ein unerwarteter Fehler ist aufgetreten.",
- "alert.unexpected.title": "Ups!",
+ "alert.unexpected.title": "Oha!",
"announcement.announcement": "Ankündigung",
"attachments_list.unprocessed": "(ausstehend)",
"audio.hide": "Audio ausblenden",
diff --git a/app/javascript/mastodon/locales/gd.json b/app/javascript/mastodon/locales/gd.json
index d835a46863..4aaa0cbf74 100644
--- a/app/javascript/mastodon/locales/gd.json
+++ b/app/javascript/mastodon/locales/gd.json
@@ -12,7 +12,7 @@
"about.powered_by": "Lìonra sòisealta sgaoilte le cumhachd {mastodon}",
"about.rules": "Riaghailtean an fhrithealaiche",
"account.account_note_header": "Nòta",
- "account.add_or_remove_from_list": "Cuir ris no thoir air falbh o na liostaichean",
+ "account.add_or_remove_from_list": "Cuir ris no thoir air falbh o liostaichean",
"account.badges.bot": "Fèin-obrachail",
"account.badges.group": "Buidheann",
"account.block": "Bac @{name}",
@@ -298,6 +298,7 @@
"filter_modal.select_filter.title": "Criathraich am post seo",
"filter_modal.title.status": "Criathraich post",
"filtered_notifications_banner.pending_requests": "{count, plural, =0 {Chan eil brath ann o dhaoine} one {Tha brathan ann o # neach} two {Tha brathan ann o # neach} few {Tha brathan ann o # daoine} other {Tha brathan ann o # duine}} air a bheil thu eòlach ’s dòcha",
+ "filtered_notifications_banner.private_mentions": "{count, plural, one {iomradh prìobhaideach} two {iomradh prìobhaideach} few {iomraidhean prìobhaideach} other {iomradh prìobhaideach}}",
"filtered_notifications_banner.title": "Brathan criathraichte",
"firehose.all": "Na h-uile",
"firehose.local": "Am frithealaiche seo",
@@ -471,6 +472,11 @@
"notification.own_poll": "Thàinig an cunntas-bheachd agad gu crìoch",
"notification.poll": "Thàinig cunntas-bheachd sa bhòt thu gu crìoch",
"notification.reblog": "Bhrosnaich {name} am post agad",
+ "notification.relationships_severance_event": "Chaill thu dàimhean le {name}",
+ "notification.relationships_severance_event.account_suspension": "Chuir rianaire aig {from} {target} à rèim agus is ciall dha sin nach fhaigh thu naidheachdan uapa ’s nach urrainn dhut conaltradh leotha.",
+ "notification.relationships_severance_event.domain_block": "Bhac rianaire aig {from} {target}, a’ gabhail a-staigh {followersCount} dhen luchd-leantainn agad agus {followingCount, plural, one {# chunntas} two {# chunntas} few {# cunntasan} other {# cunntas}} a tha thu fhèin a’ leantainn.",
+ "notification.relationships_severance_event.learn_more": "Barrachd fiosrachaidh",
+ "notification.relationships_severance_event.user_domain_block": "Bhac thu {target} agus thug sin air falbh {followersCount} dhen luchd-leantainn agad agus {followingCount, plural, one {# chunntas} two {# chunntas} few {# cunntasan} other {# cunntas}} a tha thu fhèin a’ leantainn.",
"notification.status": "Phostaich {name} rud",
"notification.update": "Dheasaich {name} post",
"notification_requests.accept": "Gabh ris",
@@ -483,6 +489,8 @@
"notifications.column_settings.admin.sign_up": "Clàraidhean ùra:",
"notifications.column_settings.alert": "Brathan deasga",
"notifications.column_settings.favourite": "Annsachdan:",
+ "notifications.column_settings.filter_bar.advanced": "Seall a h-uile roinn-seòrsa",
+ "notifications.column_settings.filter_bar.category": "Bàr-criathraidh luath",
"notifications.column_settings.follow": "Luchd-leantainn ùr:",
"notifications.column_settings.follow_request": "Iarrtasan leantainn ùra:",
"notifications.column_settings.mention": "Iomraidhean:",
@@ -508,7 +516,7 @@
"notifications.permission_denied": "Chan eil brathan deasga ri fhaighinn on a chaidh iarrtas ceadan a’ bhrabhsair a dhiùltadh cheana",
"notifications.permission_denied_alert": "Cha ghabh brathan deasga a chur an comas on a chaidh iarrtas ceadan a’ bhrabhsair a dhiùltadh cheana",
"notifications.permission_required": "Chan eil brathan deasga ri fhaighinn on nach deach an cead riatanach a thoirt seachad.",
- "notifications.policy.filter_new_accounts.hint": "Chaidh a chruthachadh o chionn {days, plural, one {# latha} two {# latha} few {# làithean} other {# latha}}",
+ "notifications.policy.filter_new_accounts.hint": "A chaidh a chruthachadh o chionn {days, plural, one {# latha} two {# latha} few {# làithean} other {# latha}}",
"notifications.policy.filter_new_accounts_title": "Cunntasan ùra",
"notifications.policy.filter_not_followers_hint": "A’ gabhail a-staigh an fheadhainn a lean ort nas lugha na {days, plural, one {# latha} two {# latha} few {# làithean} other {# latha}} seo chaidh",
"notifications.policy.filter_not_followers_title": "Daoine nach eil gad leantainn",
diff --git a/app/javascript/mastodon/locales/it.json b/app/javascript/mastodon/locales/it.json
index fd12ee298b..4679d83410 100644
--- a/app/javascript/mastodon/locales/it.json
+++ b/app/javascript/mastodon/locales/it.json
@@ -83,7 +83,7 @@
"admin.impact_report.instance_follows": "I seguaci che i loro utenti perderebbero",
"admin.impact_report.title": "Riepilogo dell'impatto",
"alert.rate_limited.message": "Sei pregato di riprovare dopo le {retry_time, time, medium}.",
- "alert.rate_limited.title": "Tasso limitato",
+ "alert.rate_limited.title": "Limitazione per eccesso di richieste",
"alert.unexpected.message": "Si è verificato un errore imprevisto.",
"alert.unexpected.title": "Oops!",
"announcement.announcement": "Annuncio",
diff --git a/app/javascript/mastodon/locales/ja.json b/app/javascript/mastodon/locales/ja.json
index 3bf89fedca..16e7e6c448 100644
--- a/app/javascript/mastodon/locales/ja.json
+++ b/app/javascript/mastodon/locales/ja.json
@@ -471,6 +471,11 @@
"notification.own_poll": "アンケートが終了しました",
"notification.poll": "アンケートが終了しました",
"notification.reblog": "{name}さんがあなたの投稿をブーストしました",
+ "notification.relationships_severance_event": "{name} との関係が失われました",
+ "notification.relationships_severance_event.account_suspension": "{from} の管理者が {target} さんを停止したため、今後このユーザーとの交流や新しい投稿の受け取りができなくなりました。",
+ "notification.relationships_severance_event.domain_block": "{from} の管理者が {target} をブロックしました。これにより{followersCount}フォロワーと{followingCount, plural, other {#フォロー}}が失われました。",
+ "notification.relationships_severance_event.learn_more": "詳細を確認",
+ "notification.relationships_severance_event.user_domain_block": "{target} のブロックにより{followersCount}フォロワーと{followingCount, plural, other {#フォロー}}が解除されました。",
"notification.status": "{name}さんが投稿しました",
"notification.update": "{name}さんが投稿を編集しました",
"notification_requests.accept": "受け入れる",
diff --git a/app/javascript/mastodon/locales/lt.json b/app/javascript/mastodon/locales/lt.json
index b43af3c0aa..0d416be2aa 100644
--- a/app/javascript/mastodon/locales/lt.json
+++ b/app/javascript/mastodon/locales/lt.json
@@ -279,6 +279,7 @@
"filter_modal.select_filter.subtitle": "Naudok esamą kategoriją arba sukurk naują.",
"filter_modal.select_filter.title": "Filtruoti šį įrašą",
"filter_modal.title.status": "Filtruoti įrašą",
+ "filtered_notifications_banner.private_mentions": "{count, plural, one {privatus paminėjimas} few {privatūs paminėjimai} many {privataus paminėjimo} other {privačių paminėjimų}}",
"firehose.all": "Visi",
"firehose.local": "Šis serveris",
"firehose.remote": "Kiti serveriai",
diff --git a/app/javascript/mastodon/locales/tt.json b/app/javascript/mastodon/locales/tt.json
index 82d45205c2..9a402472d9 100644
--- a/app/javascript/mastodon/locales/tt.json
+++ b/app/javascript/mastodon/locales/tt.json
@@ -449,9 +449,9 @@
"time_remaining.seconds": "{number, plural, one {# секунд} other {# секунд}} калды",
"timeline_hint.resources.statuses": "Older toots",
"trends.counter_by_accounts": "{count, plural, one {{counter} person} other {{counter} people}} in the past {days, plural, one {day} other {# days}}",
- "units.short.billion": "{count}Млрд",
- "units.short.million": "{count}Млн",
- "units.short.thousand": "{count}М",
+ "units.short.billion": "{count} млрд",
+ "units.short.million": "{count} млн",
+ "units.short.thousand": "{count} мең",
"upload_form.audio_description": "Describe for people with hearing loss",
"upload_form.description": "Describe for the visually impaired",
"upload_form.edit": "Үзгәртү",
diff --git a/app/lib/feed_manager.rb b/app/lib/feed_manager.rb
index 962269b830..0dcab0a675 100644
--- a/app/lib/feed_manager.rb
+++ b/app/lib/feed_manager.rb
@@ -18,7 +18,7 @@ class FeedManager
# @yield [Account]
# @return [void]
def with_active_accounts(&block)
- Account.joins(:user).where('users.current_sign_in_at > ?', User::ACTIVE_DURATION.ago).find_each(&block)
+ Account.joins(:user).merge(User.signed_in_recently).find_each(&block)
end
# Redis key of a feed
diff --git a/app/lib/vacuum/feeds_vacuum.rb b/app/lib/vacuum/feeds_vacuum.rb
index b0246bc0d2..fd55be7bfe 100644
--- a/app/lib/vacuum/feeds_vacuum.rb
+++ b/app/lib/vacuum/feeds_vacuum.rb
@@ -28,7 +28,7 @@ class Vacuum::FeedsVacuum
end
def inactive_users
- User.confirmed.inactive
+ User.confirmed.not_signed_in_recently
end
def inactive_users_lists
diff --git a/app/models/concerns/account/interactions.rb b/app/models/concerns/account/interactions.rb
index a32697b66e..536afba17f 100644
--- a/app/models/concerns/account/interactions.rb
+++ b/app/models/concerns/account/interactions.rb
@@ -255,13 +255,13 @@ module Account::Interactions
def followers_for_local_distribution
followers.local
.joins(:user)
- .where('users.current_sign_in_at > ?', User::ACTIVE_DURATION.ago)
+ .merge(User.signed_in_recently)
end
def lists_for_local_distribution
scope = lists.joins(account: :user)
scope.where.not(list_accounts: { follow_id: nil }).or(scope.where(account_id: id))
- .where('users.current_sign_in_at > ?', User::ACTIVE_DURATION.ago)
+ .merge(User.signed_in_recently)
end
def remote_followers_hash(url)
diff --git a/app/models/concerns/cacheable.rb b/app/models/concerns/cacheable.rb
index d7524cdfd0..0633f20c77 100644
--- a/app/models/concerns/cacheable.rb
+++ b/app/models/concerns/cacheable.rb
@@ -14,6 +14,10 @@ module Cacheable
includes(@cache_associated)
end
+ def preload_cacheable_associations(records)
+ ActiveRecord::Associations::Preloader.new(records: records, associations: @cache_associated).call
+ end
+
def cache_ids
select(:id, :updated_at)
end
diff --git a/app/models/feed.rb b/app/models/feed.rb
index d9cab2cd1e..27e1280994 100644
--- a/app/models/feed.rb
+++ b/app/models/feed.rb
@@ -28,7 +28,7 @@ class Feed
unhydrated = redis.zrangebyscore(key, "(#{min_id}", "(#{max_id}", limit: [0, limit], with_scores: true).map { |id| id.first.to_i }
end
- Status.where(id: unhydrated).cache_ids
+ Status.where(id: unhydrated)
end
def key
diff --git a/app/models/public_feed.rb b/app/models/public_feed.rb
index 6146bf6172..72e6249c39 100644
--- a/app/models/public_feed.rb
+++ b/app/models/public_feed.rb
@@ -31,7 +31,7 @@ class PublicFeed
scope.merge!(media_only_scope) if media_only?
scope.merge!(language_scope) if account&.chosen_languages.present?
- scope.cache_ids.to_a_paginated_by_id(limit, max_id: max_id, since_id: since_id, min_id: min_id)
+ scope.to_a_paginated_by_id(limit, max_id: max_id, since_id: since_id, min_id: min_id)
end
private
diff --git a/app/models/status.rb b/app/models/status.rb
index ef283c2201..a3c1bc0fcb 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -389,38 +389,6 @@ class Status < ApplicationRecord
StatusPin.select('status_id').where(status_id: status_ids).where(account_id: account_id).each_with_object({}) { |p, h| h[p.status_id] = true }
end
- def reload_stale_associations!(cached_items)
- account_ids = []
-
- cached_items.each do |item|
- account_ids << item.account_id
- account_ids << item.reblog.account_id if item.reblog?
- end
-
- account_ids.uniq!
-
- status_ids = cached_items.map { |item| item.reblog? ? item.reblog_of_id : item.id }.uniq
-
- return if account_ids.empty?
-
- accounts = Account.where(id: account_ids).includes(:account_stat, :user).index_by(&:id)
-
- status_stats = StatusStat.where(status_id: status_ids).index_by(&:status_id)
-
- cached_items.each do |item|
- item.account = accounts[item.account_id]
- item.reblog.account = accounts[item.reblog.account_id] if item.reblog?
-
- if item.reblog?
- status_stat = status_stats[item.reblog.id]
- item.reblog.status_stat = status_stat if status_stat.present?
- else
- status_stat = status_stats[item.id]
- item.status_stat = status_stat if status_stat.present?
- end
- end
- end
-
def from_text(text)
return [] if text.blank?
diff --git a/app/models/tag_feed.rb b/app/models/tag_feed.rb
index 051b0d1306..a4d371e4c1 100644
--- a/app/models/tag_feed.rb
+++ b/app/models/tag_feed.rb
@@ -34,7 +34,7 @@ class TagFeed < PublicFeed
scope.merge!(account_filters_scope) if account?
scope.merge!(media_only_scope) if media_only?
- scope.cache_ids.to_a_paginated_by_id(limit, max_id: max_id, since_id: since_id, min_id: min_id)
+ scope.to_a_paginated_by_id(limit, max_id: max_id, since_id: since_id, min_id: min_id)
end
private
diff --git a/app/models/user.rb b/app/models/user.rb
index 0109eec781..b49ebb14f9 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -109,14 +109,16 @@ class User < ApplicationRecord
validates :confirm_password, absence: true, on: :create
validate :validate_role_elevation
+ scope :account_not_suspended, -> { joins(:account).merge(Account.without_suspended) }
scope :recent, -> { order(id: :desc) }
scope :pending, -> { where(approved: false) }
scope :approved, -> { where(approved: true) }
scope :confirmed, -> { where.not(confirmed_at: nil) }
scope :enabled, -> { where(disabled: false) }
scope :disabled, -> { where(disabled: true) }
- scope :inactive, -> { where(arel_table[:current_sign_in_at].lt(ACTIVE_DURATION.ago)) }
- scope :active, -> { confirmed.where(arel_table[:current_sign_in_at].gteq(ACTIVE_DURATION.ago)).joins(:account).where(accounts: { suspended_at: nil }) }
+ scope :active, -> { confirmed.signed_in_recently.account_not_suspended }
+ scope :signed_in_recently, -> { where(current_sign_in_at: ACTIVE_DURATION.ago..) }
+ scope :not_signed_in_recently, -> { where(current_sign_in_at: ...ACTIVE_DURATION.ago) }
scope :matches_email, ->(value) { where(arel_table[:email].matches("#{value}%")) }
scope :matches_ip, ->(value) { left_joins(:ips).where('user_ips.ip <<= ?', value).group('users.id') }
diff --git a/app/views/application/mailer/_hashtag.html.haml b/app/views/application/mailer/_hashtag.html.haml
index 74a00e67e1..b740ba31b9 100644
--- a/app/views/application/mailer/_hashtag.html.haml
+++ b/app/views/application/mailer/_hashtag.html.haml
@@ -17,4 +17,5 @@
%span.email-mini-hashtag-img-span
= image_tag full_asset_url(account.avatar.url), alt: '', width: 16, height: 16
%td
- %p= t('user_mailer.welcome.hashtags_recent_count', people: number_with_delimiter(hashtag.history.aggregate(2.days.ago.to_date..Time.zone.today).accounts))
+ - people = hashtag.history.aggregate(2.days.ago.to_date..Time.zone.today).accounts
+ %p= t('user_mailer.welcome.hashtags_recent_count', people: number_with_delimiter(people), count: people)
diff --git a/config/locales/ar.yml b/config/locales/ar.yml
index 9043e23b99..93a0720b8a 100644
--- a/config/locales/ar.yml
+++ b/config/locales/ar.yml
@@ -1751,13 +1751,17 @@ ar:
import: استيراد
import_and_export: استيراد وتصدير
migrate: تهجير الحساب
+ notifications: إشعارات البريد الإلكتروني
preferences: التفضيلات
profile: الملف التعريفي
relationships: المتابِعون والمتابَعون
+ severed_relationships: العلاقات المنفصلة
statuses_cleanup: الحذف الآلي للمنشورات
strikes: عقوبات الإشراف
two_factor_authentication: المُصادقة بخُطوَتَيْن
webauthn_authentication: مفاتيح الأمان
+ severed_relationships:
+ download: تنزيل (%{count})
statuses:
attached:
audio:
@@ -1875,6 +1879,7 @@ ar:
contrast: ماستدون (تباين عالٍ)
default: ماستدون (داكن)
mastodon-light: ماستدون (فاتح)
+ system: تلقائي (استخدم سمة النظام)
time:
formats:
default: "%b %d, %Y, %H:%M"
@@ -1973,8 +1978,19 @@ ar:
edit_profile_title: قم بتخصيص ملفك التعريفي
explanation: ها هي بعض النصائح قبل بداية الاستخدام
feature_action: اعرف المزيد
+ feature_audience_title: اِبنوا جُمهورَكم بِثِقَة
+ feature_control: أنتم الأدرى بالمحتوى الذي تريدون أن تطالعوه في فيض المنشورات الرئيس. لا خوارزميات تتحكم فيما يظهر لكم ولا إعلانات تضيع وقتكم. بحساب واحد تمكنكم متابعة من تشاؤون على أيّ خادوم ماستدون، وتلقّى منشوراتهم بترتيبها الزمني، لتصنعوا ركنكم الأليف في الإنترنت.
+ feature_control_title: تحكَّموا في فيض المنشورات الخاص بكم
+ feature_creativity: ماستدون يدعم المشاركات الصوتية والفيديو والصورة، وصوفات الوصولية، واستطلاعات الرأي، وتحذيرات المحتوى، والصور الرمزية المتحركة، ورموز الإيموجي المطوّعة، والتحكم في قص مصغّرات الصور، والمزيد، لأجل مساعدتكم على التعبير عن أنفسكم عبر الإنترنت. فسواء كنتم تنشرون فنونكم البصرية أو الموسيقية أو البودكاستات، فستجدون ماستدون مفيدًا.
+ feature_creativity_title: إبداعٌ بلا نظير
+ feature_moderation: ماستدون يُرجع القرار لكم، حيث يضع كل خادوم قواعده ولوائحه الخاصة لإدارة المحتوى ومجتمع المشاركين، وهي تُطبّق محليا، ليس من أعلى إلى أسفل مثل منصات التواصل الاجتماعي التجارية. هذا يجعلها أكثر مرونة في الاستجابة لاحتياجات مختلف فئات الناس. انضم إلى خادوم يُطبّق القواعد التي توافق عليها، وإلا فشغّلوا خادومكم بأنفسكم.
+ feature_moderation_title: الإشرَافُ كما يَنبغي أن يكون
follow_action: تابِع
+ follow_step: إن متابعة الأشخاص المثيرين للاهتمام هي غاية ماستدون.
+ follow_title: أضفِ طابعا شخصيا على موجزات خيطك الرئيس
+ follows_subtitle: اتبع الحسابات المشهورة
follows_title: مَن عليك متابعته
+ follows_view_more: متابعة المزيد من الأشخاص
hashtags_title: الوسوم الرائجة
hashtags_view_more: عرض المزيد من الوسوم الرائجة
post_action: إنشاء
diff --git a/config/locales/devise.es.yml b/config/locales/devise.es.yml
index 0d8fc0ac67..0fc329e0b6 100644
--- a/config/locales/devise.es.yml
+++ b/config/locales/devise.es.yml
@@ -32,8 +32,8 @@ es:
subject: 'Mastodon: Correo electrónico cambiado'
title: Nueva dirección de correo electrónico
password_change:
- explanation: La contraseña de su cuenta a sido cambiada.
- extra: Si usted no a cambiado su contraseña. es probable que alguien a conseguido acceso a su cuenta. Por favor cambie su contraseña inmediatamente o contacte a el administrador de la instancia si usted esta bloqueado de su cuenta.
+ explanation: La contraseña de su cuenta ha sido cambiada.
+ extra: Si usted no ha cambiado su contraseña, es probable que alguien a conseguido acceso a su cuenta. Por favor cambie su contraseña inmediatamente o contacte al administrador de la instancia si usted está bloqueado de su cuenta.
subject: 'Mastodon: Contraseña cambiada'
title: Contraseña cambiada
reconfirmation_instructions:
diff --git a/config/locales/devise.lt.yml b/config/locales/devise.lt.yml
index 548894cca0..ec5b852727 100644
--- a/config/locales/devise.lt.yml
+++ b/config/locales/devise.lt.yml
@@ -54,9 +54,9 @@ lt:
title: 2FA išjungta
two_factor_enabled:
explanation: Prisijungiant reikės susietos TOTP programėlės sugeneruoto priegos rakto.
- subject: 'Mastodon: dviejų tapatybės patikrinimas įgalintas'
+ subject: 'Mastodon: dviejų tapatybės patvirtinimas įjungtas'
subtitle: Tavo paskyrai įjungtas dviejų tapatybės patikrinimas.
- title: 2FA įgalinta
+ title: 2FA įjungta
two_factor_recovery_codes_changed:
explanation: Ankstesnieji atkūrimo kodai yra negaliojantys ir sugeneruojami nauji.
subject: 'Mastodon: dviejų tapatybės atkūrimo kodai iš naujo sugeneruoti'
@@ -81,8 +81,8 @@ lt:
webauthn_enabled:
explanation: Tavo paskyrai įjungtas saugumo rakto tapatybės nustatymas.
extra: Tavo saugumo raktą dabar galima naudoti prisijungimui.
- subject: 'Mastodon: saugumo rakto tapatybės nustatymas įgalintas'
- title: Saugumo raktai įgalinti
+ subject: 'Mastodon: saugumo rakto tapatybės nustatymas įjungtas'
+ title: Saugumo raktai įjungti
omniauth_callbacks:
failure: Nepavyko nustatyti tapatybės iš %{kind}, nes „%{reason}“.
success: Sėkmingai nustatyta tapatybė iš %{kind} paskyros.
diff --git a/config/locales/doorkeeper.lt.yml b/config/locales/doorkeeper.lt.yml
index 1012160f62..6f63e0309d 100644
--- a/config/locales/doorkeeper.lt.yml
+++ b/config/locales/doorkeeper.lt.yml
@@ -19,7 +19,7 @@ lt:
doorkeeper:
applications:
buttons:
- authorize: Įgalinti
+ authorize: Leisti
cancel: Atšaukti
destroy: Sunaikinti
edit: Redaguoti
@@ -55,14 +55,14 @@ lt:
title: 'Programėlė: %{name}'
authorizations:
buttons:
- authorize: Įgalinti
+ authorize: Leisti
deny: Atmesti
error:
title: Įvyko klaida.
new:
- prompt_html: "%{client_name} norėtų gauti leidimą prieigos prie tavo paskyros. Tai trečiosios šalies programėlė. Jei ja nepasitiki, neturėtum jai leisti."
+ prompt_html: "%{client_name} norėtų gauti leidimą prieigos prie tavo paskyros. Tai trečiosios šalies programėlė. Jei ja nepasitiki, neturėtum leisti."
review_permissions: Peržiūrėti leidimus
- title: Reikalingas įgaliojimas
+ title: Reikalingas leidimas
show:
title: Nukopijuok šį įgaliojimo kodą ir įklijuok jį į programėlę.
authorized_applications:
@@ -77,7 +77,7 @@ lt:
never_used: Niekada nenaudotas
scopes: Leidimai
superapp: Vidinis
- title: Tavo įgaliotos programėlės
+ title: Tavo leidžiamos programėlės
errors:
messages:
access_denied: Išteklių savininkas (-ė) arba įgaliojimų serveris atmetė užklausą.
@@ -145,7 +145,7 @@ lt:
applications: Programėlės
oauth2_provider: OAuth2 teikėjas
application:
- title: Reikalingas OAuth įgaliojimas
+ title: Reikalingas OAuth leidimas
scopes:
admin:read: skaityti visus serveryje esančius duomenis
admin:read:accounts: skaityti neskelbtiną visų paskyrų informaciją
diff --git a/config/locales/doorkeeper.sr.yml b/config/locales/doorkeeper.sr.yml
index a0439d6060..010eb23eb5 100644
--- a/config/locales/doorkeeper.sr.yml
+++ b/config/locales/doorkeeper.sr.yml
@@ -22,12 +22,12 @@ sr:
authorize: Ауторизуј
cancel: Поништи
destroy: Уништи
- edit: Измени
+ edit: Уреди
submit: Пошаљи
confirmations:
destroy: Да ли сте сигурни?
edit:
- title: Измени апликацију
+ title: Уреди апликацију
form:
error: Опс! Проверите формулар за евентуалне грешке
help:
diff --git a/config/locales/gd.yml b/config/locales/gd.yml
index 11402d3f56..70bace05cf 100644
--- a/config/locales/gd.yml
+++ b/config/locales/gd.yml
@@ -1832,6 +1832,7 @@ gd:
contrast: Mastodon (iomsgaradh àrd)
default: Mastodon (dorcha)
mastodon-light: Mastodon (soilleir)
+ system: Fèin-obrachail (cleachd ùrlar an t-siostaim)
time:
formats:
default: "%d %b %Y, %H:%M"
diff --git a/config/locales/ja.yml b/config/locales/ja.yml
index b7c6813a74..0d585131ed 100644
--- a/config/locales/ja.yml
+++ b/config/locales/ja.yml
@@ -1723,6 +1723,7 @@ ja:
contrast: Mastodon (ハイコントラスト)
default: Mastodon (ダーク)
mastodon-light: Mastodon (ライト)
+ system: 自動 (システムのテーマを使用)
time:
formats:
default: "%Y年%m月%d日 %H:%M"
diff --git a/config/locales/lt.yml b/config/locales/lt.yml
index 832d9e9db4..9664a4ab57 100644
--- a/config/locales/lt.yml
+++ b/config/locales/lt.yml
@@ -410,9 +410,9 @@ lt:
silence: Riboti
suspend: Pristabdyti
title: Naujos domeno blokas
- reject_media: Atmesti medijos failai
+ reject_media: Atmesti medijos failus
reject_media_hint: Panaikina lokaliai saugomus medijos failus bei atsisako jų parsisiuntimo ateityje. Neliečia užblokavimu
- reject_reports: Atmesti skundai
+ reject_reports: Atmesti ataskaitas
reject_reports_hint: Ignoruoti visus skundus, kurie siunčiami iš šio domeno. Neliečia užblokavimu
undo: Atkurti domeno bloką
email_domain_blocks:
@@ -799,6 +799,7 @@ lt:
contrast: Mastodon (Didelio Kontrasto)
default: Mastodon (Tamsus)
mastodon-light: Mastodon (Šviesus)
+ system: Automatinis (naudoti sistemos temą)
two_factor_authentication:
disable: Išjungti
enabled: Dviejų veiksnių autentikacija įjungta
diff --git a/config/locales/simple_form.ko.yml b/config/locales/simple_form.ko.yml
index 627d96df02..790bcd061b 100644
--- a/config/locales/simple_form.ko.yml
+++ b/config/locales/simple_form.ko.yml
@@ -295,7 +295,7 @@ ko:
software_updates:
all: 모든 업데이트에 대해 알림
critical: 긴급 업데이트에 대해서만 알림
- label: 새 마스토돈 버전이 사용 가능합니다
+ label: 새 마스토돈 버전이 있을 때
none: 업데이트에 대해 알리지 않기 (비추천)
patch: 버그픽스 업데이트에 대해 알림
trending_tag: 검토해야 할 새 유행
diff --git a/config/locales/sr-Latn.yml b/config/locales/sr-Latn.yml
index 4f10fe8649..8b876b8a14 100644
--- a/config/locales/sr-Latn.yml
+++ b/config/locales/sr-Latn.yml
@@ -1396,7 +1396,7 @@ sr-Latn:
'43200': 12 sati
'604800': 1 nedelja
'86400': 1 dan
- expires_in_prompt: Nikad
+ expires_in_prompt: Nikada
generate: Generiši
invalid: Ova pozivnica nije važeća
invited_by: 'Pozvao Vas je:'
diff --git a/config/locales/sr.yml b/config/locales/sr.yml
index 382f196bd0..faed5854fb 100644
--- a/config/locales/sr.yml
+++ b/config/locales/sr.yml
@@ -65,7 +65,7 @@ sr:
disabled: Замрзнут
display_name: Име за приказ
domain: Домен
- edit: Измени
+ edit: Уреди
email: Е-пошта
email_status: Статус е-поште
enable: Омогући
@@ -402,7 +402,7 @@ sr:
created_msg: Блокирање домена се обрађује
destroyed_msg: Блокирање домена је опозвано
domain: Домен
- edit: Измени блок домена
+ edit: Уреди блок домена
existing_domain_block: Већ сте успоставили строжа ограничења према кориснику %{name}.
existing_domain_block_html: Већ сте успоставили строжа ограничења према %{name}, потребно је да га прво одблокирате.
export: Извоз
@@ -690,7 +690,7 @@ sr:
special: Посебно
delete: Избриши
description_html: Помоћу корисничких улога можете да подесите којим функцијама и деловима Mastodon-а ваши корисници могу да приступе.
- edit: Измени улогу '%{name}'
+ edit: Уреди улогу '%{name}
everyone: Подразумевана овлашћења
everyone_full_description_html: Ово је основна улога која се односи на све кориснике, чак и оне којима није додељена улога. Све друге улоге наслеђују овлашћења од основне улоге.
permissions_count:
@@ -970,7 +970,7 @@ sr:
description_html: "Webhook омогућава Mastodon-у да вашој апликацији испоручује обавештења у реалном времену о одабраним догађајима, тако да ваша апликација може да aутоматски изазове реакцију."
disable: Онемогући
disabled: Онемогућено
- edit: Измени крајњу тачку
+ edit: Уреди крајњу тачку
empty: Још увек немате ниједну конфигурисану webhook крајњу тачку.
enable: Омогући
enabled: Активно
@@ -1267,7 +1267,7 @@ sr:
keywords: Кључне речи
statuses: Засебне објаве
statuses_hint_html: Овај филтер важи за одабране засебне објаве без обзира на то да ли садрже кључне речи наведене испод. Прегледајте или уклоните објаве из филтера.
- title: Измени филтер
+ title: Уреди филтер
errors:
deprecated_api_multiple_keywords: Ови параметри не могу бити промењени у овој апликацији зато што се односе на више од једне кључне речи. Користите ажурнију апликацију или веб интерфејс.
invalid_context: Ниједан или неважећи контекст испоручен
@@ -1396,7 +1396,7 @@ sr:
'43200': 12 сати
'604800': 1 недеља
'86400': 1 дан
- expires_in_prompt: Никад
+ expires_in_prompt: Никада
generate: Генериши
invalid: Ова позивница није важећа
invited_by: 'Позвао Вас је:'
@@ -1516,7 +1516,7 @@ sr:
status:
subject: "%{name} jе управо поставио/-ла објаву"
update:
- subject: "%{name} је изменио/-ла објаву"
+ subject: "%{name} је уредио/-ла објаву"
notifications:
administration_emails: Обавештења е-поштом од администратора
email_events: Догађаји за обавештења е-поштом
@@ -1707,7 +1707,7 @@ sr:
few: 'садржи забрањене хеш ознаке: %{tags}'
one: 'садржи забрањену хеш ознаку: %{tags}'
other: 'садржи забрањене хеш ознаке: %{tags}'
- edited_at_html: Измењено %{date}
+ edited_at_html: Уређено %{date}
errors:
in_reply_not_found: Објава на коју покушавате да одговорите наизглед не постоји.
open_in_web: Отвори у вебу
@@ -1798,7 +1798,7 @@ sr:
add: Додај
disable: Искључи
disabled_success: Двофакторска аутентификација је успешно онемогућена
- edit: Измени
+ edit: Уреди
enabled: Двофакторска идентификација је укључена
enabled_success: Двофакторска идентификација је успешно укључена
generate_recovery_codes: Генериши кодове за опоравак
diff --git a/config/locales/sv.yml b/config/locales/sv.yml
index 02c4b8c55b..d078cf7200 100644
--- a/config/locales/sv.yml
+++ b/config/locales/sv.yml
@@ -597,6 +597,9 @@ sv:
actions_description_html: Välj vilken åtgärd som skall vidtas för att lösa denna rapport. Om du vidtar en bestraffningsåtgärd mot det rapporterade kontot kommer en e-postnotis att skickas till dem, förutom om du valt kategorin Skräppost.
actions_description_remote_html: Bestäm vilka åtgärder som ska vidtas för att lösa denna rapport. Detta kommer bara att påverka hur din server kommunicerar med detta fjärrkonto och hanterar dess innehåll.
add_to_report: Lägg till mer i rapporten
+ already_suspended_badges:
+ local: Redan avstängd på denna server
+ remote: Redan avstängd på deras server
are_you_sure: Är du säker?
assign_to_self: Tilldela till mig
assigned: Tilldelad moderator
@@ -1656,12 +1659,21 @@ sv:
preferences: Inställningar
profile: Profil
relationships: Följer och följare
+ severed_relationships: Avbrutna relationer
statuses_cleanup: Automatisk radering av inlägg
strikes: Modereringsprickar
two_factor_authentication: Tvåfaktorsautentisering
webauthn_authentication: Säkerhetsnycklar
severed_relationships:
+ download: Hämta (%{count})
+ event_type:
+ account_suspension: Kontoavstängning (%{target_name})
+ domain_block: Serveravstängning (%{target_name})
+ user_domain_block: Du blockerade %{target_name}
+ lost_followers: Förlorade följare
lost_follows: Förlorade följare
+ preamble: Du kan förlora följer och följare när du blockerar en domän eller när din moderator väljer att stänga av en fjärrserver. När det händer kommer du kunna hämta listor över avbrutna relationer som kan inspekteras och eventuellt importeras på en annan server.
+ purged: Information om denna server har rensats av din servers administratörer.
type: Händelse
statuses:
attached:
diff --git a/config/locales/tt.yml b/config/locales/tt.yml
index c1a22a4ca8..82bb18c9ae 100644
--- a/config/locales/tt.yml
+++ b/config/locales/tt.yml
@@ -6,7 +6,7 @@ tt:
accounts:
follow: Языл
followers:
- other: Язылучы
+ other: язылучы
following: Язылгансыз
posts:
other: Язма
@@ -137,14 +137,14 @@ tt:
new_users: яңа кулланучылар
software: Программа тәэминаты
title: Идарә аслыгы
- website: Вебсайт
+ website: Веб-сайт
domain_allows:
- export: Экспортлау
- import: Импортлау
+ export: Экспорт
+ import: Импорт
domain_blocks:
domain: Домен
- export: Экспортлау
- import: Импортлау
+ export: Экспорт
+ import: Импорт
new:
severity:
noop: Бернинди дә
@@ -438,8 +438,8 @@ tt:
decimal_units:
format: "%n %u"
units:
- billion: Млрд
- million: Млн
+ billion: млрд
+ million: млн
quadrillion: Квадрлн
thousand: Мең
trillion: Трлн
@@ -455,7 +455,7 @@ tt:
preferences:
other: Башка
privacy_policy:
- title: Хосусыйлык Сәясәте
+ title: Хосусыйлык сәясәте
relationships:
dormant: Актив түгел
followers: Язылучылар
diff --git a/lib/mastodon/cli/progress_helper.rb b/lib/mastodon/cli/progress_helper.rb
index 4fcc47a7f7..f22492afcf 100644
--- a/lib/mastodon/cli/progress_helper.rb
+++ b/lib/mastodon/cli/progress_helper.rb
@@ -35,10 +35,8 @@ module Mastodon::CLI
aggregate = Concurrent::AtomicFixnum.new(0)
scope.reorder(nil).find_in_batches do |items|
- futures = []
-
- items.each do |item|
- futures << Concurrent::Future.execute(executor: pool) do
+ futures = items.map do |item|
+ Concurrent::Future.execute(executor: pool) do
if !progress.total.nil? && progress.progress + 1 > progress.total
# The number of items has changed between start and now,
# since there is no good way to predict the final count from
diff --git a/lib/templates/haml/scaffold/_form.html.haml b/lib/templates/haml/scaffold/_form.html.haml.tt
similarity index 100%
rename from lib/templates/haml/scaffold/_form.html.haml
rename to lib/templates/haml/scaffold/_form.html.haml.tt
diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb
index 201ff6dbb0..704cc1270e 100644
--- a/spec/controllers/application_controller_spec.rb
+++ b/spec/controllers/application_controller_spec.rb
@@ -225,39 +225,4 @@ describe ApplicationController do
include_examples 'respond_with_error', 422
end
-
- describe 'cache_collection' do
- subject do
- Class.new(ApplicationController) do
- public :cache_collection
- end
- end
-
- shared_examples 'receives :with_includes' do |fabricator, klass|
- it 'uses raw if it is not an ActiveRecord::Relation' do
- record = Fabricate(fabricator)
- expect(subject.new.cache_collection([record], klass)).to eq [record]
- end
- end
-
- shared_examples 'cacheable' do |fabricator, klass|
- include_examples 'receives :with_includes', fabricator, klass
-
- it 'calls cache_ids of raw if it is an ActiveRecord::Relation' do
- record = Fabricate(fabricator)
- relation = klass.none
- allow(relation).to receive(:cache_ids).and_return([record])
- expect(subject.new.cache_collection(relation, klass)).to eq [record]
- end
- end
-
- it 'returns raw unless class responds to :with_includes' do
- raw = Object.new
- expect(subject.new.cache_collection(raw, Object)).to eq raw
- end
-
- context 'with a Status' do
- include_examples 'cacheable', :status, Status
- end
- end
end
diff --git a/spec/fabricators/preview_card_provider_fabricator.rb b/spec/fabricators/preview_card_provider_fabricator.rb
index 78db710003..3a027623f7 100644
--- a/spec/fabricators/preview_card_provider_fabricator.rb
+++ b/spec/fabricators/preview_card_provider_fabricator.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
Fabricator(:preview_card_provider) do
- domain { Faker::Internet.domain_name }
+ domain { sequence(:domain) { |i| "#{i}#{Faker::Internet.domain_name}" } }
end
diff --git a/spec/fabricators/unavailable_domain_fabricator.rb b/spec/fabricators/unavailable_domain_fabricator.rb
index cb9707020a..88e605c36e 100644
--- a/spec/fabricators/unavailable_domain_fabricator.rb
+++ b/spec/fabricators/unavailable_domain_fabricator.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
Fabricator(:unavailable_domain) do
- domain { Faker::Internet.domain_name }
+ domain { sequence(:domain) { |i| "#{i}#{Faker::Internet.domain_name}" } }
end
diff --git a/spec/models/home_feed_spec.rb b/spec/models/home_feed_spec.rb
index bd649d8269..06bb63b1a4 100644
--- a/spec/models/home_feed_spec.rb
+++ b/spec/models/home_feed_spec.rb
@@ -27,7 +27,6 @@ RSpec.describe HomeFeed do
results = subject.get(3)
expect(results.map(&:id)).to eq [3, 2]
- expect(results.first.attributes.keys).to eq %w(id updated_at)
end
end
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index 2a07263069..714d595dc1 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -107,12 +107,36 @@ RSpec.describe User do
end
end
- describe 'inactive' do
- it 'returns a relation of inactive users' do
- specified = Fabricate(:user, current_sign_in_at: 15.days.ago)
- Fabricate(:user, current_sign_in_at: 6.days.ago)
+ describe 'signed_in_recently' do
+ it 'returns a relation of users who have signed in during the recent period' do
+ recent_sign_in_user = Fabricate(:user, current_sign_in_at: within_duration_window_days.ago)
+ Fabricate(:user, current_sign_in_at: exceed_duration_window_days.ago)
- expect(described_class.inactive).to contain_exactly(specified)
+ expect(described_class.signed_in_recently)
+ .to contain_exactly(recent_sign_in_user)
+ end
+ end
+
+ describe 'not_signed_in_recently' do
+ it 'returns a relation of users who have not signed in during the recent period' do
+ no_recent_sign_in_user = Fabricate(:user, current_sign_in_at: exceed_duration_window_days.ago)
+ Fabricate(:user, current_sign_in_at: within_duration_window_days.ago)
+
+ expect(described_class.not_signed_in_recently)
+ .to contain_exactly(no_recent_sign_in_user)
+ end
+ end
+
+ describe 'account_not_suspended' do
+ it 'returns with linked accounts that are not suspended' do
+ suspended_account = Fabricate(:account, suspended_at: 10.days.ago)
+ non_suspended_account = Fabricate(:account, suspended_at: nil)
+ suspended_user = Fabricate(:user, account: suspended_account)
+ non_suspended_user = Fabricate(:user, account: non_suspended_account)
+
+ expect(described_class.account_not_suspended)
+ .to include(non_suspended_user)
+ .and not_include(suspended_user)
end
end
@@ -137,6 +161,14 @@ RSpec.describe User do
expect(described_class.matches_ip('2160:2160::/32')).to contain_exactly(user1)
end
end
+
+ def exceed_duration_window_days
+ described_class::ACTIVE_DURATION + 2.days
+ end
+
+ def within_duration_window_days
+ described_class::ACTIVE_DURATION - 2.days
+ end
end
describe 'blacklist' do
diff --git a/spec/features/oauth_spec.rb b/spec/system/oauth_spec.rb
similarity index 94%
rename from spec/features/oauth_spec.rb
rename to spec/system/oauth_spec.rb
index 720c262890..060978217f 100644
--- a/spec/features/oauth_spec.rb
+++ b/spec/system/oauth_spec.rb
@@ -3,13 +3,14 @@
require 'rails_helper'
describe 'Using OAuth from an external app' do
- let(:client_app) { Doorkeeper::Application.create!(name: 'test', redirect_uri: 'http://localhost/', scopes: 'read') }
+ let(:client_app) { Doorkeeper::Application.create!(name: 'test', redirect_uri: 'http://localhost/health', scopes: 'read') }
context 'when the user is already logged in' do
let!(:user) { Fabricate(:user) }
before do
- sign_in user, scope: :user
+ visit new_user_session_path
+ fill_in_auth_details(user.email, user.password)
end
it 'when accepting the authorization request' do
@@ -164,20 +165,19 @@ describe 'Using OAuth from an external app' do
expect(Doorkeeper::AccessGrant.exists?(application: client_app, resource_owner_id: user.id)).to be false
end
end
-
- private
-
- def fill_in_auth_details(email, password)
- fill_in 'user_email', with: email
- fill_in 'user_password', with: password
- click_on I18n.t('auth.login')
- end
-
- def fill_in_otp_details(value)
- fill_in 'user_otp_attempt', with: value
- click_on I18n.t('auth.login')
- end
-
# TODO: external auth
end
+
+ private
+
+ def fill_in_auth_details(email, password)
+ fill_in 'user_email', with: email
+ fill_in 'user_password', with: password
+ click_on I18n.t('auth.login')
+ end
+
+ def fill_in_otp_details(value)
+ fill_in 'user_otp_attempt', with: value
+ click_on I18n.t('auth.login')
+ end
end
diff --git a/yarn.lock b/yarn.lock
index 02accb2596..ec2724c834 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3762,11 +3762,11 @@ __metadata:
linkType: hard
"@types/react-dom@npm:^18.0.0, @types/react-dom@npm:^18.2.4":
- version: 18.2.23
- resolution: "@types/react-dom@npm:18.2.23"
+ version: 18.2.24
+ resolution: "@types/react-dom@npm:18.2.24"
dependencies:
"@types/react": "npm:*"
- checksum: 10c0/9348e93558aa67b4b237bd0eab62e72e85f3e17a1c45fde04d874476269730f7c671b3d62390c4fca588da2a026e90cc74148abc349dbfd4ee5535a82ccdf38e
+ checksum: 10c0/9ec38e5ab4727c56ef17bd8e938ead88748ba19db314b8d9807714a5cae430f5b799514667b221b4f2dc8d9b4ca17dd1c3da8c41c083c2de9eddcc31bec6b8ff
languageName: node
linkType: hard
@@ -3865,12 +3865,12 @@ __metadata:
linkType: hard
"@types/react@npm:*, @types/react@npm:16 || 17 || 18, @types/react@npm:>=16.9.11, @types/react@npm:^18.2.7":
- version: 18.2.73
- resolution: "@types/react@npm:18.2.73"
+ version: 18.2.74
+ resolution: "@types/react@npm:18.2.74"
dependencies:
"@types/prop-types": "npm:*"
csstype: "npm:^3.0.2"
- checksum: 10c0/b6645ab3c20efa41cfccf58ce0be45419517a0ba4594e323dd400342fb1c1f9589d169cf9bfa85b5b0605e9097fe9de7734b6d0c533f5b9bc32aaadb624537a4
+ checksum: 10c0/347e38b4c5dc20d50ff71bf04b7caaef490e5ff695e74a0088a13fbb2a0c5d125a5ecfd142adfa30f0176da0e2734942c91ba61d95ce269c43b3265bd7379361
languageName: node
linkType: hard
@@ -7768,8 +7768,8 @@ __metadata:
linkType: hard
"eslint-plugin-formatjs@npm:^4.10.1":
- version: 4.12.2
- resolution: "eslint-plugin-formatjs@npm:4.12.2"
+ version: 4.13.0
+ resolution: "eslint-plugin-formatjs@npm:4.13.0"
dependencies:
"@formatjs/icu-messageformat-parser": "npm:2.7.6"
"@formatjs/ts-transformer": "npm:3.13.12"
@@ -7784,7 +7784,7 @@ __metadata:
unicode-emoji-utils: "npm:^1.2.0"
peerDependencies:
eslint: 7 || 8
- checksum: 10c0/77cc1a2959903fcb6639d9fec89e7dfc55cf1e4ea58fca7d3bd6d12fa540aa173cbf5f90fc629b6aaf2ea3b8e61ed0a3cfce940fd2bec6f0796353315e2dbeef
+ checksum: 10c0/3dbe4ffd3e72d4ce5b14afdcf6dd5db889dd09cb15bc875f29bcc5b49295e0ae4a3eb672ed89ed33f22aacbfe655151398ca4307fd0610508e568a6e4db50aa8
languageName: node
linkType: hard
@@ -7816,8 +7816,8 @@ __metadata:
linkType: hard
"eslint-plugin-jsdoc@npm:^48.0.0":
- version: 48.2.2
- resolution: "eslint-plugin-jsdoc@npm:48.2.2"
+ version: 48.2.3
+ resolution: "eslint-plugin-jsdoc@npm:48.2.3"
dependencies:
"@es-joy/jsdoccomment": "npm:~0.42.0"
are-docs-informative: "npm:^0.0.2"
@@ -7830,7 +7830,7 @@ __metadata:
spdx-expression-parse: "npm:^4.0.0"
peerDependencies:
eslint: ^7.0.0 || ^8.0.0 || ^9.0.0
- checksum: 10c0/d6911e73d36757de5aef127e795116fbbcdef504f7e91d9c0863faf0b1693271d96188f0f1d54c0d74c56652bfa3fb4f1aa1a2f0876b0c6a5e57a874bcb3ac2b
+ checksum: 10c0/e755923d96118890c6fd28b1c2298e1fe67ccbce08060ffc091b29ced59d0058ad8820323c56eef6f85c2954c783fc4076e78c0e5bc64838ae099b4e62ea702e
languageName: node
linkType: hard
@@ -12987,7 +12987,7 @@ __metadata:
languageName: node
linkType: hard
-"pino-abstract-transport@npm:^1.0.0, pino-abstract-transport@npm:v1.1.0":
+"pino-abstract-transport@npm:^1.0.0, pino-abstract-transport@npm:^1.1.0":
version: 1.1.0
resolution: "pino-abstract-transport@npm:1.1.0"
dependencies:
@@ -13041,13 +13041,13 @@ __metadata:
linkType: hard
"pino@npm:^8.17.1, pino@npm:^8.17.2":
- version: 8.19.0
- resolution: "pino@npm:8.19.0"
+ version: 8.20.0
+ resolution: "pino@npm:8.20.0"
dependencies:
atomic-sleep: "npm:^1.0.0"
fast-redact: "npm:^3.1.1"
on-exit-leak-free: "npm:^2.1.0"
- pino-abstract-transport: "npm:v1.1.0"
+ pino-abstract-transport: "npm:^1.1.0"
pino-std-serializers: "npm:^6.0.0"
process-warning: "npm:^3.0.0"
quick-format-unescaped: "npm:^4.0.3"
@@ -13057,7 +13057,7 @@ __metadata:
thread-stream: "npm:^2.0.0"
bin:
pino: bin.js
- checksum: 10c0/53e6e9db91e451163e93294b0a7c5c8135742d58909dfc4a6fa1afc155b2b0dc44448ec3d057e08351951f9a3ea67e6ea8e72e952b64a1d889f4d5376cbd1a5d
+ checksum: 10c0/6b973474160e1fa01fa150de0f69b7db9c6c06ae15f992d369669751825c8f2af3bb5600348eaf9be65b4952326bbdfa226f51e425820eb511f0f594fbddbaa7
languageName: node
linkType: hard
@@ -14344,8 +14344,8 @@ __metadata:
linkType: hard
"react-intl@npm:^6.4.2":
- version: 6.6.4
- resolution: "react-intl@npm:6.6.4"
+ version: 6.6.5
+ resolution: "react-intl@npm:6.6.5"
dependencies:
"@formatjs/ecma402-abstract": "npm:1.18.2"
"@formatjs/icu-messageformat-parser": "npm:2.7.6"
@@ -14363,7 +14363,7 @@ __metadata:
peerDependenciesMeta:
typescript:
optional: true
- checksum: 10c0/bd874ad3a56b0198903c02c878cfa23b5ae9a44d2c74fd4f01ddb602c97a8115de8cebed00b44f7dc5fb3031e5ef0f9cfb4bdabd105b99a785352462deb106d3
+ checksum: 10c0/31f231701af080bc923fdf25ff22ae7ad56bd7892602879fe6fa3de0c6ab95aab10ff86595372be155e0be45a7130a2cca91dbab73e558359cebc1785711ded2
languageName: node
linkType: hard
@@ -16413,18 +16413,18 @@ __metadata:
linkType: hard
"stylelint-config-standard-scss@npm:^13.0.0":
- version: 13.0.0
- resolution: "stylelint-config-standard-scss@npm:13.0.0"
+ version: 13.1.0
+ resolution: "stylelint-config-standard-scss@npm:13.1.0"
dependencies:
stylelint-config-recommended-scss: "npm:^14.0.0"
stylelint-config-standard: "npm:^36.0.0"
peerDependencies:
postcss: ^8.3.3
- stylelint: ^16.1.0
+ stylelint: ^16.3.1
peerDependenciesMeta:
postcss:
optional: true
- checksum: 10c0/4abf317676184f4aaace6ce72b9fc9e2dffe051d43dd5637afc5803b062ea381e2807ae983c045dff22e96af58388a8b1fe9a8bdda9f97bc3660280cf24fb4d3
+ checksum: 10c0/d07cae806ee8b3e77684f019a8b22cc32642373da8053e6ae7ed716f8ddbe6ea1f7323633a6a1bbc9aa08c6a3dceb1dcf053d83fdd10d076b5a01da6e86801ae
languageName: node
linkType: hard
@@ -17107,22 +17107,22 @@ __metadata:
linkType: hard
"typescript@npm:5, typescript@npm:^5.0.4":
- version: 5.4.3
- resolution: "typescript@npm:5.4.3"
+ version: 5.4.4
+ resolution: "typescript@npm:5.4.4"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
- checksum: 10c0/22443a8760c3668e256c0b34b6b45c359ef6cecc10c42558806177a7d500ab1a7d7aac1f976d712e26989ddf6731d2fbdd3212b7c73290a45127c1c43ba2005a
+ checksum: 10c0/4d8de0291204ed61ca97ad0cba2ce064e09c4988ca1c451c787e4653ba76296ba35177a52694e8a00cf4ef899d0ee83338663b926d8b7d55167ff0ba81549999
languageName: node
linkType: hard
"typescript@patch:typescript@npm%3A5#optional!builtin, typescript@patch:typescript@npm%3A^5.0.4#optional!builtin":
- version: 5.4.3
- resolution: "typescript@patch:typescript@npm%3A5.4.3#optional!builtin::version=5.4.3&hash=5adc0c"
+ version: 5.4.4
+ resolution: "typescript@patch:typescript@npm%3A5.4.4#optional!builtin::version=5.4.4&hash=5adc0c"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
- checksum: 10c0/6e51f8b7e6ec55b897b9e56b67e864fe8f44e30f4a14357aad5dc0f7432db2f01efc0522df0b6c36d361c51f2dc3dcac5c832efd96a404cfabf884e915d38828
+ checksum: 10c0/1fa41b9964a9ff0ed913b339c90b46031b2d2da3cb1a192af516610733f7f1d5f7f9754a8e22b9ac7076d3d8aedd2c4f84db3f113bad060eac3a95962443a1bf
languageName: node
linkType: hard