Commit Graph

30 Commits (bddd36f2602a809e64920292c4bb4382a4b97c1d)

Author SHA1 Message Date
Matt Jankowski 40fd1de488 Account search service refactor ()
* Begin coverage for account search service

* Coverage for hashtag query

* Coverage for calling local vs remote find based on domain presence

* Spec to check that exact matches are not duped

* Coverage of resolve option

* Coverage for account being provided

* Start to refactor account search service

* Isolate query username and domain methods

* Isolate exact_match method

* Extract methods for local and remote results

* Simplify local vs remote and account isoliation

* Extract methods for local and remote results

* Simplify de-dupe of exact match

* Simplify logic to check for non exact remotes

* Cache some methods

* Remove nil from exact_match from results array

* Return exact matches first

* Use find_remote even with no domain

Account.find_local is just an alias for Account.find_remote(user, nil) - so we
can not bother with the conditional here, and call find_remote directly.
Eugen 982fef811e Fix , fix - Avatar/profile info fetching ()
* Fix , fix  - Work through UpdateRemoteProfileService for both <feed> and <entry> top-level tags

* Improve code quality, remove line unrelated to fix
Chad Pytel ad5ddd5e95 Use I18n for media attachment validation errors
These are currently user facing errors, but are not localized. This adds the
ability for these messages to be localized.
Chad Pytel 13c0077003 Add specs for PostStatusService
This implements all pending specs, and adds additional coverage for the
following functionality:

* Normal status creation
* Creating a reply status
* Creating a sensitive status
* Creating a status with spoiler text
* A status with no spoiler text gets an empty string for spoiler text
* Creating a status with custom visibility
* Creating a status for an application
* Processing mentions
* Processing Hashtags
* Pinging PuSH hubs
* Crawling links
* Attaching media
Chad Pytel 38bec79811 Add specs for media attachment validations
There are currently not specs for the two media validations that are performed
by `PostStatusService`. This adds specs for the validations that ensure that you
cannot attach more than four files, and that a status cannot have both image and
video attachments.
Eugen Rochko 5442083b3c Split SalmonWorker into smaller parts, move profile updating into another job
Kurtis Rainbolt-Greene 9ae9ecdebe Quick attempt to get pull requests passing
Eugen Rochko 68f829e11c Add basic logging of who resolved report
Kit Redgrave 442fdbfc53 Mute button progress so far. WIP, doesn't entirely work correctly.
Eugen Rochko 720ff55262 Adding more unit tests. Fixing Salmon slaps XML
Eugen Rochko 0518492158 Stop trying to shoehorn all Salmon updates into the poor database-connected
StreamEntry model. Simply render Salmon slaps as they are needed
Eugen Rochko d9ca46b464 Cleaning up format of broadcast real-time messages, removing
redis-backed "mentions" timeline as redundant (given notifications)
Eugen Rochko 6d98a73180 Domain blocks now have varying severity - auto-suspend vs auto-silence
Eugen Rochko 6de079a5af Removing external hub completely, fix fixing digit-only hashtags,
removing web app capability from non-webapp pages
Eugen Rochko 2cb3dc5e5a Update hub URL and re-subscribe if hub URL changes
Eugen Rochko 7b7bf834e9 Fix OAuth authorization page and add a spec for it
Eugen Rochko cd765f26a9 Upgrade ruby to 2.3.1
Eugen Rochko 93212bc2c4 Add test for FanOutOnWriteService
Eugen Rochko 81065bc06c Adding test for ProcessFeedService
Eugen Rochko 22a8801dbc Adding domain blocks
Eugen Rochko 7b9a4af311 API for blocking and unblocking
Eugen Rochko c6b0311b86 Fix - Fetch remote accounts by URL from mentions
Fetching atom extracted from FetchRemoteAccountService and FetchRemoteStatusService
into FetchAtomService. Mentions of the constant "http://activityschema.org/collection/public"
skipped as it's not a real URL/user.
Eugen Rochko adffc7a495 Fix
Eugen Rochko 02e4fb2e06 Only re-download avatar if URL changed (fix )
Eugen Rochko d4892ace62 Adding more test stubs
Eugen Rochko 7837afbb5f Removing autogenerated test stubs that were not needed
Eugen Rochko 3b4e04dc32 Fixing some bugs, adding pending test examples
Eugen Rochko 23d08c6749 Changing the use of config constants to the Rails configuration object
Eugen Rochko 11ff92c9d7 Adding a test for ReblogService, fixing mentions for remote statuses
Eugen Rochko 71fe24096c Adding a Mention model, test stubs