Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Use Account.local.sum(statuses_count) instead of Status.local.count #4996
So it is approximately 40 times faster.
i-abh-esc-wq added a commit to i-abh-esc-wq/mastodon that referenced this pull request
Sep 20, 2017
* Fetch reblogs as Announce activity instead of Note object (tootsuite#4672) * Process Create / Announce activity in FetchRemoteStatusService * Use activity URL in ActivityPub for reblogs * Redirect to the original status on StatusesController#show * Add configuration to disable private status federation over PuSH (tootsuite#4582) * Disable babel-loader cache when development environment (tootsuite#4684) * Don't load Roboto webfont when system font is used in the app (tootsuite#4591) * Don't load Roboto webfont when system font is used in the app * remove trailing whitespace * Update Russian translation (tootsuite#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) * Pinned statuses (tootsuite#4675) * Pinned statuses * yarn manage:translations * i18n: Update Polish translation tootsuite#4675 (tootsuite#4692) Signed-off-by: Marcin Mikołajczak <firstname.lastname@example.org> * Add label for application scopes (tootsuite#4691) * Add label for application scopes * hint * Update addressable to version 2.5.2 (tootsuite#4686) * i18n Updated strings (tootsuite#4675 - pinned toot) (tootsuite#4695) * Added string for pinned toots * Pinned toot tootsuite#4675 + missing string Somehow I deleted it "enabled_success" * update after advice * Adjust styles of landing pages. (tootsuite#4682) * Adjust about.scss * Delete trailing whitespace. * Change timezone of the datetime to what browser specifies (tootsuite#4688) * Apply user timezone for the title attribute of .time-ago (tootsuite#4693) * Allow multiple pinned statuses to be shown and make them be ordered b… (tootsuite#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 * Fix ar.json (tootsuite#4699) Remove ! from compose_form.publish * Fix missing at-sign (regression from tootsuite#4688) (tootsuite#4705) * authorize-follow-requests-after-unlocking (tootsuite#4658) * Added new translations of error messages, block and mute domains and users, privacy disclaimers, etc (tootsuite#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 * Add handling of Linked Data Signatures in payloads (tootsuite#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 * Set margin between character-counter and compose-form__buttons (tootsuite#4698) For some languages publish translation is long. * Add ActivityPub serializer for Undo of Announce (tootsuite#4703) * Use Tombstone and _:atomUri in Delete activities as fallback (tootsuite#4704) * Forward ActivityPub deletes to followers of rebloggers (tootsuite#4706) * Add _:inReplyToAtomUri to ActivityPub (tootsuite#4702) * Allow Symbol keyed Hash in LinkedDataSignature (tootsuite#4715) SerializarbleResource#as_json serializes to Symbol keyed Hash, but current implementation of LinkedDataSignature expects String keyed Hash. So it generates broken payload. * Adjust RTL styles (tootsuite#4712) * Add japanese translations for Pinned statuses based on pawoo. (tootsuite#4717) Add japanese translations for pin_errors. * Shorten display of large numbers on public profiles (tootsuite#4711) * Adjust public profile pages (tootsuite#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; * Adjust "signed in as" pages (tootsuite#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 * Add japanese translations for shorten display of large numbers (tootsuite#4722) * rescue HTTP::ConnectionError in RemoteFollowController#create (tootsuite#4726) * Fix deletion of status which has been reblogged (tootsuite#4728) * Fix Delete activity handling when the status has been reblogged (tootsuite#4729) * Generalized the infinite scrollable list (tootsuite#4697) * Do not scroll the columns area due to redirection (tootsuite#4541) Commit 9d1f8b9 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. * Serialize ActivityPub alternate link into OStatus deletes, handle it (tootsuite#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. * fix error when single columns mode. (tootsuite#4734) * Scroll smoothly to the right (tootsuite#4735) * Update bundler-audit and brakeman (tootsuite#4740) * Remove unneccesary indices (tootsuite#4738) We only look up status_pins by account_id, or account_id and status_id, never by status_id * Update status embeds (tootsuite#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 * Use request.remote_ip instead of request.ip (tootsuite#4744) * Add close tag of iframe for oEmbed response (tootsuite#4745) * Add close tag of iframe for oEmbed response * add comma * Forward ActivityPub creates that reply to local statuses (tootsuite#4709) * Forward ActivityPub creates that reply to local statuses * Fix test * Fix wrong signers * error fixed (when loading pages in single column mode.) (tootsuite#4746) * Update to Alpine 3.6 (tootsuite#4747) * Add sharedInbox to actors (tootsuite#4737) * Embed modal (tootsuite#4748) * Embed modal * Proxy OEmbed requests from web UI * Fix the usages of Detect Passive Events (tootsuite#4749) * Guarantee Subscription service first account has proper URL details (tootsuite#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 * Don't process ActivityPub payload if signature is invalid (tootsuite#4752) * Don't process ActivityPub payload if signature is invalid * Fix style issue * Remove identity context from output of LinkedDataSignature (tootsuite#4753) * Fallback from perform_via_activitypub on private posts (tootsuite#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 * Convert OStatus tag to ActivityPub id on in_reply_to resolution (tootsuite#4756) * Refactor Web::PushSubscription, remove welcome message (tootsuite#4524) * Refactor Web::PushSubscription, remove welcome message * Add missing helper * Use locale of the receiver on push notifications (tootsuite#4519) * Remove unused translations * Fix dir on notifications * Update FR locales (tootsuite#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 * Make first use less overwhelming with browser permissions (tootsuite#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 * Use system's default font on non web UI pages (tootsuite#4553) * Use system's default font on non web UI pages * Remove import for Redirect * Make PreviewCard records reuseable between statuses (tootsuite#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 (tootsuite#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 * Fix NoMethodError (tootsuite#4762) * Deduplicate with local status on Create activity (tootsuite#4763) * Adjust padding on the public profile page (tootsuite#4757) * Fix a style issue on the public profile page for some mobile browsers Signed-off-by: Cygnan <email@example.com> * Set padding-bottom to 20px Signed-off-by: Cygnan <firstname.lastname@example.org> * Do not rely on activity arriving exactly once after delete arrived (tootsuite#4754) * Avoid sending some ActivityPub payloads if the receiver will get them through distribution (tootsuite#4739) * Finish up embed modal feature (tootsuite#4759) * Add embed button to dropdowns of in-timeline statuses * yarn run manage:translations * Add ActivityPub handler for Delete->Actor activities (tootsuite#4761) * Add link to 'noscript' message (tootsuite#4561) * Add link to 'noscript' message Signed-off-by: Marcin Mikołajczak <email@example.com> * remove indent * Add RoutingHelper (tootsuite#4769) * Add japanese translations for embed modal feature. (tootsuite#4770) * Use updated ActivityStreams context (added: sharedInbox) (tootsuite#4764) * Define missing JSON-LD properties (tootsuite#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. * Disable embed modal when private status (tootsuite#4773) * Disable embed modal when private status * Remove `reblogDisabled` * Fix profile page when use system's font (tootsuite#4774) * Add text color style for noscript link (tootsuite#4772) * Add Japanese translate for tootsuite#4561 (tootsuite#4771) * Adjust settings pages (tootsuite#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 * i18n: Update Polish translation (tootsuite#4775) Signed-off-by: Marcin Mikołajczak <firstname.lastname@example.org> * Don't unconditionally call `preventDefault` and `stopPropagation` on all keyup events (tootsuite#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 * Fix WebPush (regression from tootsuite#4524) (tootsuite#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 * Raise an error for remote url in StatusFinder (tootsuite#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 * fix text position of NSFW in Safari (Mac/iPhone) (tootsuite#4570) * Make "unfollow" undo pending outgoing follow request too (tootsuite#4781) * Make "unfollow" undo pending outgoing follow request too * Add cancel button to web UI when awaiting follow request approval * Make the hourglass button do the cancelling * i18n: Improve Polish translation (tootsuite#4783) Signed-off-by: Marcin Mikołajczak <email@example.com> * Validate data of Imports (tootsuite#4782) * Rename "locked" to "manuallyApprovesFollowers" in ActivityPub (tootsuite#4779) See: <https://www.w3.org/wiki/Activity_Streams_extensions#as:manuallyApprovesFollowers> * Improve client-side German i18n (tootsuite#4785) * Instantly upgrade account to ActivityPub if we receive ActivityPub payload (tootsuite#4766) * Bump version to 1.6.0rc1 (tootsuite#4768) * Explicitly define attached file of DeprecatedPreviewCard (tootsuite#4786) The path template of the attached files must explicitly be defined because it is contradicting to the name of the class. * l10n Occitan update for Embed, cancel follow request, ... (tootsuite#4788) * Update: some missing strings * Updates missing strings * New string * Update oc.json * Update oc.yml * Update oc.json * Croatian translation - updated (tootsuite#4183) * Update hr.json * Update hr.json * Use next instead of return in task (tootsuite#4787) * Make german translation more gender neutral tootsuite#4755 (tootsuite#4789) * Fix short number locales (tootsuite#4790) Overwrite values from rails-i18n by manually overwriting in every locale. We want numbers like 1.5K in every language * Fix a problem that notification column goes to top (tootsuite#4792) * Fix tootsuite#4551 - Use correct syntax for content preloading (tootsuite#4798) * Fix streaming url to lowercase (tootsuite#4804) * Show pinned statuses only in the top of the profile page (tootsuite#4803) * Show pinned statuses only in the top of the profile page * Refactor AccountsController#show_pinned_statuses? * Fix some ActivityPub JSON bugs (tootsuite#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 * Update ar.yml (tootsuite#4810) Some little changes to "ar" locale * Translation korean added (tootsuite#4802) * comment correction (tootsuite#4812) * add index_notifications_on_id_and_account_id_and_activity_type on notifications table (tootsuite#4750) * Adjust status embeds (tootsuite#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 * Fix tootsuite#4794 - Fake instant follow in API response when account is believed unlocked (tootsuite#4799) * Fix mentions in direct statuses not being delivered via AP (tootsuite#4806) * Do not execute the job with the same arguments as the retry job (tootsuite#4814) * swift-enable the paperclip!
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews.