about summary refs log tree commit diff
path: root/app/lib/activitypub/activity/create.rb
AgeCommit message (Collapse)Author
2020-11-07Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
2020-11-04Add account sensitized (#14361)Takeshi Umeda
* Add account sensitized * Fix i18n normalize * Fix description and spec * Fix spec * Fix wording
2020-08-30Merge branch 'master' into glitch-soc/merge-upstreamThibaut Girka
Conflicts: - `app/controllers/accounts_controller.rb`: Upstream change too close to a glitch-soc change related to instance-local toots. Merged upstream changes. - `app/services/fan_out_on_write_service.rb`: Minor conflict due to glitch-soc's handling of Direct Messages, merged upstream changes. - `yarn.lock`: Not really a conflict, caused by glitch-soc-only dependencies being textually too close to updated upstream dependencies. Merged upstream changes.
2020-08-30Add support for dereferencing objects through bearcaps (#14683)Eugen Rochko
2020-08-24Add support for inlined objects in activity audience (#14514)ThibG
* Add support for inlined objects in activity audience * Add tests
2020-08-04Add support for direct message assertionsFire Demon
2020-07-22Dereference object URIs in Create and Update messages (#14359)ThibG
* Dereference object URIs in Create and Update messages Fixes #14353 Signed-off-by: Thibaut Girka <thib@sitedethib.com> * Refactor, and perform origin check *before* attempting to fetch object Co-authored-by: Fire Demon <firedemon@creature.cafe>
2020-07-14Fix rubocop warning (#14288)abcang
* Fix rubocop warning * use limit variable * use ContextCreatingMethods option
2020-06-29Add customizable thumbnails for audio and video attachments (#14145)Eugen Rochko
- Change audio files to not be stripped of metadata - Automatically extract cover art from audio if it exists - Add `thumbnail` parameter to `POST /api/v1/media`, `POST /api/v2/media` and `PUT /api/v1/media/:id` - Add `icon` to represent it in attachments in ActivityPub - Fix `preview_url` containing URL of missing missing image when there is no thumbnail instead of null - Fix duration of audio not being displayed on public pages until the file is loaded
2020-06-02Add E2EE API (#13820)Eugen Rochko
2020-05-15Add support for `summary` field for media description (#13763)ThibG
2019-12-17Clean up OStatus-related codepaths (#12173)ThibG
* Remove “protocol” argument and return value, as only ActivityPub is supported * Remove FetchRemoteAccountService, only use ActivityPub::FetchRemoteAccountService * Fix tests
2019-12-17Fixes featured hashtag setting page erroring out instead of rejecting ↵ThibG
invalid tags (#12436) * Revert "Fix ignoring whole status because of one invalid hashtag (#11621)" This reverts commit dff46b260b2f7d765d254c84a4b89105c7de5e97. * Fix statuses being rejected because of invalid hashtag names * Add spec for invalid hashtag names in statuses * Add test for featured tags controller
2019-11-30Fallback to Create audience when object has no defined audience (#12249)ThibG
Fixes #11137
2019-09-29Add voters count support (#11917)ThibG
* Add voters count to polls * Add ActivityPub serialization and parsing of voters count * Add support for voters count in WebUI * Move incrementation of voters count out of redis lock * Reword “voters” to “people”
2019-09-18Change spam check to apply to local accounts and add a threshold (#11806)Eugen Rochko
Instead of detecting spam on first duplicate message, add a threshold of 5 such messages to reduce false positives
2019-09-10Add retry for failed media downloads and `tootctl media refresh` (#11775)Eugen Rochko
2019-07-28Revert "Remove conversation URI (#11423)" (#11424)Eugen Rochko
This reverts commit 75f7f9930eb2a6f5c4041ec44fe0aa795c9ec449.
2019-07-28Remove conversation URI (#11423)Eugen Rochko
It is not part of ActivityPub and will free up a lot of space
2019-07-28Change hashtags to preserve first-used casing (#11416)Eugen Rochko
2019-07-13Add a spam check (#11217)Eugen Rochko
* Add a spam check * Use Nilsimsa to generate locality-sensitive hashes and compare using Levenshtein distance * Add more tests * Add exemption when the message is a reply to something that mentions the sender * Use Nilsimsa Compare Value instead of Levenshtein distance * Use MD5 for messages shorter than 10 characters * Add message to automated report, do not add non-public statuses to automated report, add trust level to accounts and make unsilencing raise the trust level to prevent repeated spam checks on that account * Expire spam check data after 3 months * Add support for local statuses, reduce expiration to 1 week, always create a report * Add content warnings to the spam check and exempt empty statuses * Change Nilsimsa threshold to 95 and make sure removed statuses are removed from the spam check * Add all matched statuses into automatic report
2019-07-08Refactor controllers for statuses, accounts, and more (#11249)Eugen Rochko
2019-06-22Fix audio not being downloaded from remote servers (#11145)Eugen Rochko
2019-06-22Change domain blocks to automatically support subdomains (#11138)Eugen Rochko
* Change domain blocks to automatically support subdomains If a more authoritative domain is blocked (example.com), then the same block will be applied to a subdomain (foo.example.com) * Match subdomains of existing accounts when blocking/unblocking domains * Improve code style
2019-06-03Handle blank poll options more gracefully (#10946)ThibG
Pleroma currently allows (erroneously imho) empty poll options, that is, options with an empty (but existing) `name`.
2019-05-23Fix possible race condition when processing statuses (#10815)ThibG
2019-04-27Add blurhash (#10630)Eugen Rochko
* Add blurhash * Use fallback color for spoiler when blurhash missing * Federate the blurhash and accept it as long as it's at most 5x5 * Display unknown media attachments as blurhash placeholders * Improve style of embed actions and spoiler button * Change blurhash resolution from 3x3 to 4x4 * Improve dependency definitions * Fix code style issues
2019-03-28Rename :poll to :preloadable_poll and :owned_poll to :poll on Status (#10401)Eugen Rochko
Also, fix some n+1 queries Resolve #10365
2019-03-12Fix poll update handler calling method was that was not available (#10246)Eugen Rochko
* Fix poll update handler calling method was that was not available Fix regression from #10209 * Refactor VoteService * Refactor ActivityPub::DistributePollUpdateWorker and optimize it * Fix typo * Fix typo
2019-03-11Support pushing and receiving updates to poll tallies (#10209)ThibG
* Process incoming poll tallies update * Send Update on poll vote * Do not send Updates for a poll more often than once every 3 minutes * Include voters in people to notify of results update * Schedule closing poll worker on poll creation * Add new notification type for ending polls * Add front-end support for ended poll notifications * Fix UpdatePollSerializer * Fix Updates not being triggered by local votes * Fix tests failure * Fix web push notifications for closing polls * Minor cleanup * Notify voters of both remote and local polls when those close * Fix delivery of poll updates to mentioned accounts and voters
2019-03-08Do not allow adding votes to expired polls (#10214)ThibG
* Do not allow adding votes to expired polls * Only validate expires_at on create
2019-03-07Avoid unnecessarily fetching the replies collection when it is empty (#10201)ThibG
2019-03-04Store remote votes URI (#10158)ThibG
* Store remote votes URI * Add spec for accepting remote votes * Make poll vote id generation work the same way as follows
2019-03-04Add tests for ActivityPub poll processing (#10143)Eugen Rochko
2019-03-04Fix remote poll expiration time (#10144)Eugen Rochko
2019-03-03Add polls (#10111)Eugen Rochko
* Add polls Fix #1629 * Add tests * Fixes * Change API for creating polls * Use name instead of content for votes * Remove poll validation for remote polls * Add polls to public pages * When updating the poll, update options just in case they were changed * Fix public pages showing both poll and other media
2019-02-28Improved remote thread fetching (#10106)ThibG
* Fetch up to 5 replies when discovering a new remote status This is used for resolving threads downwards. The originating server must add a “replies” attributes with such replies for it to be useful. * Add some tests for ActivityPub::FetchRepliesWorker * Add specs for ActivityPub::FetchRepliesService * Serialize up to 5 public self-replies for ActivityPub notes * Add specs for ActivityPub::NoteSerializer * Move exponential backoff logic to a worker concern * Fetch first page of paginated collections when fetching thread replies * Add specs for paginated collections in replies * Move Note replies serialization to a first CollectionPage The collection isn't actually paginable yet as it has no id nor a `next` field. This may come in another PR. * Use pluck(:uri) instead of map(&:uri) to improve performances * Fix fetching replies when they are in a CollectionPage
2019-02-27Fix mention processing for unknwon accounts on incoming ActivityPub Notes ↵ThibG
(#10125) `::FetchRemoteAccountService` is not `ActivityPub::FetchRemoteAccountService`, its second argument is the pre-fetched body. Passing `id: false` actually passed a `Hash` as the prefetched body, instead of properly resolving unknown remote accounts.
2019-02-17Add logging for rejected ActivityPub payloads and add tests (#10062)Eugen Rochko
2019-02-15Filter incoming Announce activities by relation to local activity (#10041)Eugen Rochko
* Filter incoming Announce activities by relation to local activity Reject if announcer is not followed by local accounts, and is not from an enabled relay, and the object is not a local status Follow-up to #10005 * Fix tests
2019-02-13Filter incoming Create activities by relation to local activity (#10005)Eugen Rochko
Reject those from accounts with no local followers, from relays that are not enabled, which do not address local accounts and are not replies to accounts that do have local followers
2019-02-13Alternative handling of private self-boosts (#9998)ThibG
* When self-boosting, embed original toot into Announce serialization * Process unknown self-boosts from Announce object if it is more than an URI * Add some self-boost specs * Only serialize private toots in self-Announces
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-16Use summary as summary for converted ActivityPub objects (#9823)Eugen Rochko
Fix #8609
2019-01-16Reduce chances of race conditions when processing deleted toots (#9815)ThibG
* Reduce chances of race conditions when processing deleted toots * Prevent race condition when processing deleted toots
2018-12-26Fix ThreadResolveWorker getting queued with invalid URLs (#9628)Eugen Rochko
2018-11-10Fix emoji update date processing (#9255)ThibG
2018-10-30Accept the same payload in multiple inboxes and deliver (#9150)Eugen Rochko
2018-10-29Add Page AP type support (#9121)m.b
2018-10-26Ignore invalid hashtags on remote statuses instead of rejecting them (#9118)ThibG
Fixes #9115