about summary refs log tree commit diff
path: root/spec
AgeCommit message (Collapse)Author
2017-12-05Add list of lists component to web UI (#5811)Eugen Rochko
* Add list of lists component to web UI * Add list adding * Add list removing * List editor modal * Add API account search limited by following=true relation * Rework list editor modal * Remove mandatory pagination of GET /api/v1/lists/:id/accounts * Adjust search input placeholder * Fix rspec (#5890) * i18n: (zh-CN) Add missing translations for #5811 (#5891) * i18n: (zh-CN) yarn manage:translations -- zh-CN * i18n: (zh-CN) Add missing translations for #5811 * Fix some issues - Display loading/missing state for list timelines - Order lists alphabetically in overview - Fix async list editor reset - Redirect to /lists after deleting unpinned list - Redirect to / after pinning a list * Remove dead list columns when a list is deleted or fetch returns 404
2017-11-30Add semi-support for Video/Image objects in ActivityPub (#5848)Eugen Rochko
* Add semi-support for Video/Image objects in ActivityPub Video and Image objects will create corresponding status records with manually crafted text contents (title + URL) * Extract html-url-finding logic into JsonLdHelper * Fallback to id when url missing, extract supported object types
2017-11-30Fix too many forwards (#5854)Eugen Rochko
* Avoid sending explicit Undo->Announce when original deleted * Do not forward a reply back to the server that sent it * Deduplicate inboxes of rebloggers' followers for delete forwarding * Adjust test * Fix wrong class, bad SQL, wrong variable, outdated comment
2017-11-28Allow hiding of reblogs from followed users (#5762)aschmitz
* Allow hiding of reblogs from followed users This adds a new entry to the account menu to allow users to hide future reblogs from a user (and then if they've done that, to show future reblogs instead). This does not remove or add historical reblogs from/to the user's timeline; it only affects new statuses. The API for this operates by sending a "reblogs" key to the follow endpoint. If this is sent when starting a new follow, it will be respected from the beginning of the follow relationship (even if the follow request must be approved by the followee). If this is sent when a follow relationship already exists, it will simply update the existing follow relationship. As with the notification muting, this will now return an object ({reblogs: [true|false]}) or false for each follow relationship when requesting relationship information for an account. This should cause few issues due to an object being truthy in many languages, but some modifications may need to be made in pickier languages. Database changes: adds a show_reblogs column (default true, non-nullable) to the follows and follow_requests tables. Because these are non-nullable, we use the existing MigrationHelpers to perform this change without locking those tables, although the tables are likely to be small anyway. Tests included. See also <https://github.com/glitch-soc/mastodon/pull/212>. * Rubocop fixes * Code review changes * Test fixes This patchset closes #648 and resolves #3271. * Rubocop fix * Revert reblogs defaulting in argument, fix tests It turns out we needed this for the same reason we needed it in muting: if nil gets passed in somehow (most usually by an API client not passing any value), we need to detect and handle it. We could specify a default in the parameter and then also catch nil, but there's no great reason to duplicate the default value.
2017-11-28Fix handling of temporary failures in ProcessMentionsService (#5842)ThibG
* Add test for temporary account resolving failures in ProcessMentionsService * Fix processing of mentions to already-known remote accounts on temporary failures
2017-11-27Add consumable invites (#5814)Eugen Rochko
* Add consumable invites * Add UI for generating invite codes * Add tests * Display max uses and expiration in invites table, delete invite * Remove unused column and redundant validator - Default follows not used, probably bad idea - InviteCodeValidator is redundant because RegistrationsController checks invite code validity * Add admin setting to disable invites * Add admin UI for invites, configurable role for invite creation - Admin UI that lists everyone's invites, always available - Admin setting min_invite_role to control who can invite people - Non-admin invite UI only visible if users are allowed to * Do not remove invites from database, expire them instantly
2017-11-24Add tests for Streamable (#5771)ysksn
2017-11-24Add tests for AccountRelationshipsPresenter (#5805)ysksn
2017-11-24Add logging of admin actions (#5757)Eugen Rochko
* Add logging of admin actions * Update brakeman whitelist * Log creates, updates and destroys with history of changes * i18n: Update Polish translation (#5782) Signed-off-by: Marcin Mikołajczak <me@m4sk.in> * Split admin navigation into moderation and administration * Redesign audit log page * 🇵🇱 (#5795) * Add color coding to audit log * Change dismiss->resolve, log all outcomes of report as resolve * Update terminology (e-mail blacklist) (#5796) * Update terminology (e-mail blacklist) imho looks better * Update en.yml * Fix code style issues * i18n-tasks normalize
2017-11-21Add tests for Remotable (#5768)ysksn
2017-11-19Fix N+1 at notification (#5752)abcang
2017-11-19Add tests for AccountInteractions (#5751)ysksn
* Add tests for class methods of AccountInteractions * Add tests for instance methods of AccountInteractions
2017-11-19Add a test for Settings::Extend#settings (#5720)ysksn
2017-11-19Add tests for Status#title (#5718)ysksn
2017-11-18Lists (#5703)Eugen Rochko
* Add structure for lists * Add list timeline streaming API * Add list APIs, bind list-account relation to follow relation * Add API for adding/removing accounts from lists * Add pagination to lists API * Add pagination to list accounts API * Adjust scopes for new APIs - Creating and modifying lists merely requires "write" scope - Fetching information about lists merely requires "read" scope * Add test for wrong user context on list timeline * Clean up tests
2017-11-17Remove empty strings (#5732)ysksn
2017-11-16Add tests for Status#verb (#5717)ysksn
2017-11-16Add tests for Status#hidden? (#5719)ysksn
2017-11-15Delegate some methods of User to @settings (#5706)ysksn
* Move some tests of User into Settings::ScopedSettings * Add a test for User@settings
2017-11-15Add a test for Tag#to_param (#5705)ysksn
2017-11-15Optional notification muting (#5087)Surinna Curtis
* Add a hide_notifications column to mutes * Add muting_notifications? and a notifications argument to mute! * block notifications in notify_service from hard muted accounts * Add specs for how mute! interacts with muting_notifications? * specs testing that hide_notifications in mutes actually hides notifications * Add support for muting notifications in MuteService * API support for muting notifications (and specs) * Less gross passing of notifications flag * Break out a separate mute modal with a hide-notifications checkbox. * Convert profile header mute to use mute modal * Satisfy eslint. * specs for MuteService notifications params * add trailing newlines to files for Pork :) * Put the label for the hide notifications checkbox in a label element. * Add a /api/v1/mutes/details route that just returns the array of mutes. * Define a serializer for /api/v1/mutes/details * Add more specs for the /api/v1/mutes/details endpoint * Expose whether a mute hides notifications in the api/v1/relationships endpoint * Show whether muted users' notifications are muted in account lists * Allow modifying the hide_notifications of a mute with the /api/v1/accounts/:id/mute endpoint * make the hide/unhide notifications buttons work * satisfy eslint * In probably dead code, replace a dispatch of muteAccount that was skipping the modal with launching the mute modal. * fix a missing import * add an explanatory comment to AccountInteractions * Refactor handling of default params for muting to make code cleaner * minor code style fixes oops * Fixed a typo that was breaking the account mute API endpoint * Apply white-space: nowrap to account relationships icons * Fix code style issues * Remove superfluous blank line * Rename /api/v1/mutes/details -> /api/v2/mutes * Don't serialize "account" in MuteSerializer Doing so is somewhat unnecessary since it's always the current user's account. * Fix wrong variable name in api/v2/mutes * Use Toggle in place of checkbox in the mute modal. * Make the Toggle in the mute modal look better * Code style changes in specs and removed an extra space * Code review suggestions from akihikodaki Also fixed a syntax error in tests for AccountInteractions. * Make AddHideNotificationsToMute Concurrent It's not clear how much this will benefit instances in practice, as the number of mutes tends to be pretty small, but this should prevent any blocking migrations nonetheless. * Fix up migration things * Remove /api/v2/mutes
2017-11-15Add tests for StreamEntry (#5687)ysksn
* Add tests for StreamEntry - `#object_type` - `#verb` - `#mentions` * Fix to test results instead of implementations
2017-11-14Add option to block direct messages from people you don't follow (#5669)Eugen Rochko
* Add option to block direct messages from people you don't follow Fix #5326 * If the DM responds to a toot by recipient, allow it through * i18n: Update Polish translation (for #5669) (#5673)
2017-11-14Add a test for SiteUpload#cache_key (#5685)ysksn
2017-11-14Refactor remote_follow_spec.rb (#5690)Yamagishi Kazutoshi
2017-11-14Add uniqueness to block email domains (#5692)Yamagishi Kazutoshi
2017-11-14Add tests for Setting (#5683)ysksn
2017-11-13Add tests for SessionActivation (#5668)ysksn
* Fabricate SessionActivation not only user_id but user association. * Add tests for SessionActivation
2017-11-12Add tests for RemoteProfile (#5665)ysksn
2017-11-10Add tests for RemoteFollow (#5651)ysksn
* Add tests for RemoteFollow.initialize * Add tests for RemoteFollow#valid? * Add tests for RemoteFollow#subscribe_address_for
2017-11-09Add tests for Notification (#5640)ysksn
* Add tests for Notification#target_status * Add tests for Notification#browserable? * Add tests for Notification.reload_stale_associations!
2017-11-09Add and Remove tests for FollowRequest (#5622)ysksn
* Add a test for FollowRequest#authorize! * Remove tests There is no need to test ActiveModel::Validations::ClassMethods#validates. * Make an alias of destroy! as reject! Instead of defining the method, make an alias of destroy! as reject! because of reducing test.
2017-11-09Rewrite account_controller_spec (#5633)Nanamachi
* make accounts_controller_spec DRY * Add blocked user spec
2017-11-08Add tests for MediaAttachment (#5620)ysksn
- `#local?` - `#needs_redownload?` - `#to_param`
2017-11-08Add tests for CustomEmoji#local? and #object_type (#5621)ysksn
2017-11-06Implement tests for Account#refresh! (#5601)ysksn
2017-11-06Add test for Account#save_with_optional_media! (#5603)ysksn
There was a test when some of the properties are invalid, but none when all of them are valid.
2017-11-05Implement tests for Account#possibly_stale? (#5591)ysksn
2017-10-26Fix Cocaine::ExitStatusError when upload small non-animated GIF (#5489)unarist
Looks like copied tempfile need to be flushed before further processing. This issue won't happen if the uploaded file has enough file size.
2017-10-17Clean up reblog tracking keys, related improvements (#5428)aschmitz
* Clean up reblog-tracking sets from FeedManager Builds on #5419, with a few minor optimizations and cleanup of sets after they are no longer needed. * Update tests, fix multiply-reblogged case Previously, we would have lost the fact that a given status was reblogged if the displayed reblog of it was removed, now we don't. Also added tests to make sure FeedManager#trim cleans up our reblog tracking keys, fixed up FeedCleanupScheduler to use the right loop, and fixed the test for it.
2017-10-16Keep references to all reblogs of a status on home feed (#5419)Eugen Rochko
* Keep references to all reblogs of a status on home feed When inserting reblog: Add to set of reblogs of this status on the feed, if original status was present in the feed, add it to that set as well. When removing a reblog: Remove it from that set. Take random remaining item from the set. If one exists, re-insert it into feed, otherwise do not re-insert anything. Fix #4210 * When original is removed, toss out reblog references
2017-10-16Fix un-reblogged status being at wrong position in the home timeline (#5418)unarist
We've changed un-reblogging behavior when we implement Snowflake, to insert un-reblogged status at the position reblogging status existed. However, our API expects home timeline is ordered by status ids, and max_id/since_id filters by zset score. Due to this, un-reblogged status appears as a last item of result set, and timeline expansion may skips many statuses. So this reverts that change...reblogged status inserted at corresponding position to its id.
2017-10-16Replace JavaScript Testing Framework from Mocha to Jest (#5412)Yamagishi Kazutoshi
2017-10-14Use atomUri in Undo activity of Announce (#5376)unarist
This allows deletion of reblogs which delivered before with OStatus URI.
2017-10-13Improve spec of Feed and UserTrackingConcern (#5367)Eugen Rochko
2017-10-13Retoot count increases without reason (#5363)Lex Alexander
* Retoot count increases without reason -The store_uri method for Statuses was being called on after_create and causing reblogs to be incremented twice. -This calls it when the transaction is finished by using after_create_commit. -Fixes #4916. * Added test case for after_create_commit callback for checking reblog count. * Rewrote test to keep original, but added one for only the after_create_commit callback.
2017-10-09Fix pagination in Api::V1::BlocksController (#5285)Akihiko Odaki
2017-10-08Set snowflake IDs for backdated statuses (#5260)Eugen Rochko
- Rename Mastodon::TimestampIds into Mastodon::Snowflake for clarity - Skip for statuses coming from inbox, aka delivered in real-time - Skip for statuses that claim to be from the future
2017-10-07Add moderation note (#5240)nullkal
* Add moderation note * Add frozen_string_literal * Make rspec pass
2017-10-07Redesign public hashtag pages (#5237)Eugen Rochko