about summary refs log tree commit diff
path: root/app/services
AgeCommit message (Collapse)Author
2019-02-12Move sending account Delete to anyone but the account's followers to the ↵ThibG
pull̀ queue (#10016)
2019-02-06Fix Tombstone.delete_all ArgumentError (#9978)abcang
2019-02-04Add featured hashtags to profiles (#9755)Eugen Rochko
* Add hashtag filter to profiles GET /@:username/tagged/:hashtag GET /api/v1/accounts/:id/statuses?tagged=:hashtag * Display featured hashtags on public profile * Use separate model for featured tags * Update featured hashtag counters on-write * Limit featured tags to 10
2019-02-03Add option to overwrite imported data (#9962)Eugen Rochko
* Add option to overwrite imported data Fix #7465 * Add import for domain blocks
2019-02-02Create Redisable#redis (#9633)ysksn
* Create Redisable * Use #redis instead of Redis.current
2019-01-26Prevent posting toots with media attachments from someone else (#9921)ThibG
2019-01-24Rescue SSL error in verify link service (#9914)Renato "Lond" Cerqueira
If the first link to be verified contains a rel=me link with a SSL error, the VerifyAccountLinksWorker will fail and not try the following links. This rescues the SSL error when fetching the link, avoiding this issue.
2019-01-21Fix scheduled toot with media immediately creating a toot (#9894)ThibG
* Add test for not persisting status when attaching media to scheduled toot * Prevent status used for validation from being persisted to the database Fixes #9893 Thanks to tateisu for the help investigating this.
2019-01-19Fix error when `scheduled_at` attribute is malformed (#9866)Eugen Rochko
2019-01-18Reject existing Follow in addition to sending a Block (#9811)ThibG
Mastodon expects remote servers to remove follow relationships upon receiving a Block. However, the spec only evokes Block activities in a C2S context, never in a S2S context. This PR, in addition to federating the Block, explicitly sends a Reject for any affected follow relationship, which makes a bit more sense with regards to the spec.
2019-01-18Add tombstones for remote statuses (#9830)ThibG
* Add Tombstone model to remember object deletion * Do not recreate a status if it has been deleted * Record Tombstone for remote deleted items Also, only record deleted items from same-host actors * Clear an user's tombstones when their key change
2019-01-18Fix code style of regeneration-related code (#9843)Eugen Rochko
2019-01-14Fix undefined method error in sidekiq (#9807)Renato "Lond" Cerqueira
* Fix undefined method error in sidekiq Body can be not nil but still be empty, which causes a `NoMethodError: undefined method `[]' for nil:NilClass` further in the code. This checks for an empty body to avoid the issue. * Fix codeclimate issue
2019-01-07Improvements to signature verification (#9667)ThibG
* Refactor signature verification a bit * Rescue signature verification if recorded public key is invalid Fixes #8822 * Always re-fetch AP signing key when HTTP Signature verification fails But when the account is not marked as stale, avoid fetching collections and media, and avoid webfinger round-trip. * Apply stoplight to key/account update as well as initial key retrieval
2019-01-07Add locale param to sign-up API (#9747)Eugen Rochko
Fix #9627
2019-01-06Fix wrong param name in scheduled statuses and return params in API (#9725)Eugen Rochko
The database column and API param are called in_reply_to_id, not in_reply_to_status_id, so it makes no sense to encode it that way
2019-01-05Add scheduled statuses (#9706)Eugen Rochko
Fix #340
2019-01-05Use Contact User as Relay, Report, Subscribe. (#9661)Naoki Kosaka
* Use Contact User as Relay, Report, Subscribe. * Use Account.representative to fetch contact user. * Use find_local. * No reason to use Account.representative in subscribe_service. * Don't required representative! * Fallback is included in Account.representative method.
2018-12-31Fix links not being verified (#9673)kodai
Fix #9365
2018-12-30Skip full text search if failed (#9654)Jeong Arm
* Skip full text search if failed * Move rescue block to "perform_statuses_search!"
2018-12-30Avoid duplicate work by merging ReplyDistributionWorker into ↵ThibG
DistributionWorker (#9660)
2018-12-30Reduce usage of LD signatures (#9659)ThibG
* Do not LDS-sign Follow, Accept, Reject, Undo, Block * Do not use LDS for Create activities of private toots * Minor cleanup * Ignore unsigned activities instead of misattributing them * Use status.distributable? instead of querying visibility directly
2018-12-29Add handler for Move activity (#9629)Eugen Rochko
2018-12-28Improve admin UI for account view (#9643)Eugen Rochko
2018-12-24Add REST API for creating an account (#9572)Eugen Rochko
* Add REST API for creating an account The method is available to apps with a token obtained via the client credentials grant. It creates a user and account records, as well as an access token for the app that initiated the request. The user is unconfirmed, and an e-mail is sent as usual. The method returns the access token, which the app should save for later. The REST API is not available to users with unconfirmed accounts, so the app must be smart to wait for the user to click a link in their e-mail inbox. The method is rate-limited by IP to 5 requests per 30 minutes. * Redirect users back to app from confirmation if they were created with an app * Add tests * Return 403 on the method if registrations are not open * Require agreement param to be true in the API when creating an account
2018-12-24Limit maximum visibility of local silenced users to unlisted (#9583)ThibG
Fixes #9580
2018-12-17 Ignore low-confidence CharlockHolmes guesses when parsing link cards (#9510)ThibG
* Add failing test for windows-1251 link cards * Ignore low-confidence CharlockHolmes guesses Fixes #9466 * Fix no method error when charlock holmes cannot detect charset
2018-12-14Error message for avatar image that's too large. #9204 (#9518)Sumit Khanna
* Error message for avatar image that's too large. #9204 * Code climate/formatting * Removed avatar error message * Moved valid image dimentions check to update service * removed unnescessary begin block * code climate formatting * code climate indent fix
2018-12-12Remove redundant (#9503)ysksn
2018-12-12Use find_or_initialize_by (#9504)ysksn
2018-12-06Add profile directory (#9427)Eugen Rochko
Fix #5578
2018-12-03Improve account suspension speed and completeness (#9290)Eugen Rochko
- Some associations were missing from the clean-up - Some attributes were not reset on suspension - Skip federation and streaming deletes when purging a dead domain - Move account association definitions to concern
2018-11-22Ignore JSON-LD profile in mime type comparison (#9179)valerauko
Ignore JSON-LD profile in mime type comparison
2018-11-19Simplify hashtag query service, perf increase for 'any' tags (#9298)James Kiesel
2018-11-16Remove intermediary arrays when creating hash maps from results (#9291)Eugen Rochko
2018-11-10Fix emoji update date processing (#9255)ThibG
2018-11-10Check that twitter:player is valid before using it (#9254)ThibG
Fixes #9251
2018-11-08Optimize the process of following someone (#9220)Eugen Rochko
* Eliminate extra accounts select query from FollowService * Optimistically update follow state in web UI and hide loading bar Fix #6205 * Asynchronize NotifyService in FollowService And fix failing test * Skip Webfinger resolve routine when called from FollowService if possible If an account is ActivityPub, then webfinger re-resolving is not necessary when called from FollowService. Improve options of ResolveAccountService
2018-11-05Update resolve_url_service.rb (#9188)m.b
2018-11-05Allow joining several hashtags in a single column (#8904)James Kiesel
* Nascent tag menu on frontend * Hook up frontend to search * Tag intersection backend first pass * Update yarnlock * WIP * Fix for tags not searching correctly * Make radio buttons function * Simplify radio buttons with modeOption * Better naming * Rearrange options * Add all/any/none functionality on backend * Small PR cleanup * Move to service from scope * Small cleanup, add proper service tests * Don't use send with user input :D * Set appropriate column header * Handle auto updating timeline * Fix up toggle function * Use tag value correctly * A bit more correct to use 'self' rather than 'all' in status scope * Fix some style issues * Fix more code style issues * Style select dropdown more better * Only use to_id'ed value to ensure no SQL injection * Revamp frontend to allow for multiple selects * Update backend / col header to account for more flexible tagging * Update brakeman ignore * Codeclimate suggestions * Fix presenter tag_url * Implement initial PR feedback * Handle additional tag streaming * CodeClimate tweak
2018-10-31Revert "Fix FetchAtomService content type handling (#9132)" (#9171)Eugen Rochko
This reverts commit c36a4a16178441968715e13c77859b1eb813c2af.
2018-10-30Fix FetchAtomService content type handling (#9132)valerauko
* Add profile to json+ld in Accept It's required by the ActivityPub spec * Use headers['Content-type'] instead of mime_type mime_type strips the profile from the content type, but it's still available raw in the headers hash * Add test for ld+json with profile
2018-10-30Accept the same payload in multiple inboxes and deliver (#9150)Eugen Rochko
2018-10-30Always let through notifications from staff (#9152)Eugen Rochko
* Always let through notifications from staff Follow-up to #8993 * Let messages from staff through, but no other notifications
2018-10-30Fix Pleroma mentions being fetched as preview cards (#9158)ThibG
2018-10-30Do not hide boost notifications from followed people with hidden boosts (#9147)ThibG
* Do not hide boost notifications from followed people with hidden boosts Not displaying boosts from a followed user in the Home timeline and not having notifications when they reblog your own content are two very separate concerns, tying them together seem counter-intuitive and unwanted. * Update specs accordingly
2018-10-28Include preview cards in status entity in REST API (#9120)Eugen Rochko
* Include preview cards in status entity in REST API * Display preview card in-stream * Improve in-stream display of preview cards
2018-10-26Add locality check to ActivityPub::FetchRemoteAccountService (#9109)Eugen Rochko
* Add locality check to ActivityPub::FetchRemoteAccountService Fix #8643 Because there are a few places where it is called, it is difficult to confirm if they all previously checked it for locality. It's better to make sure within the service. * Remove faux-remote duplicates of local accounts
2018-10-26Skip link-back check if body is nil (#9107)abcang
2018-10-25Do not fetch preview card for mentioned users (#6934)ThibG