about summary refs log tree commit diff
path: root/app/models
AgeCommit message (Collapse)Author
2022-11-17Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `.github/workflows/build-image.yml`: Upstream changed how docker images were built, including how they were cached. I don't know much about it, so applied upstream's changes. - `app/controllers/admin/domain_blocks_controller.rb`: The feature, that was in glitch-soc, got backported upstream. It also had a few fixes upstream, so those have been ported! - `app/javascript/packs/admin.js`: Glitch-soc changes have been backported upstream. As a result, some code from `app/javascript/core/admin.js` got added upstream. Kept our version since our shared Javascript already has that feature. - `app/models/user.rb`: Upstream added something to distinguish unusable and unusable-because-moved accounts, while glitch-soc considers moved accounts usable. Took upstream's code for `functional_or_moved?` and made `functional?` call it. - `app/views/statuses/_simple_status.html.haml`: Upstream cleaned up code style a bit, on a line that we had custom changes for. Applied upstream's change while keeping our change. - `config/initializers/content_security_policy.rb`: Upstream adopted one CSP directive we already had. The conflict is because of our files being structurally different, but the change itself was already part of glitch-soc. Kept our version.
2022-11-17Fix various issues with domain block import (#1944)Claire
- stop using Paperclip for processing domain allow/block imports - stop leaving temporary files - better error handling - assume CSV files are UTF-8-encoded
2022-11-17Support for import/export of instance-level domain blocks/allows for 4.x w/ ↵lenore gilbert
additional fixes (#20597) * Allow import/export of instance-level domain blocks/allows (#1754) * Allow import/export of instance-level domain blocks/allows. Fixes #15095 * Pacify circleci * Address simple code review feedback * Add headers to exported CSV * Extract common import/export functionality to AdminExportControllerConcern * Add additional fields to instance-blocked domain export * Address review feedback * Split instance domain block/allow import/export into separate pages/controllers * Address code review feedback * Pacify DeepSource * Work around Paperclip::HasAttachmentFile for Rails 6 * Fix deprecated API warning in export tests * Remove after_commit workaround (cherry picked from commit 94e98864e39c010635e839fea984f2b4893bef1a) * Add confirmation page when importing blocked domains (#1773) * Move glitch-soc-specific strings to glitch-soc-specific locale files * Add confirmation page when importing blocked domains (cherry picked from commit b91196f4b73fff91997b8077619ae25b6d04a59e) * Fix authorization check in domain blocks controller (cherry picked from commit 75279377583c6e2aa04cc8d7380c593979630b38) * Fix error strings for domain blocks and email-domain blocks Corrected issue with non-error message used for Mastodon:NotPermittedError in Domain Blocks Corrected issue Domain Blocks using the Email Domain Blocks message on ActionContoller::ParameterMissing Corrected issue with Email Domain Blocks using the not_permitted string from "custom emojii's" * Ran i18n-tasks normalize to address test failure * Removed unused admin.export_domain_blocks.not_permitted string Removing unused string as indicated by Check i18n * Fix tests (cherry picked from commit 9094c2f52c24e1c00b594e7c11cd00e4a07eb431) * Fix domain block export not exporting blocks with only media rejection (cherry picked from commit 26ff48ee48a5c03a2a4b0bd03fd322529e6bd960) * Fix various issues with domain block import - stop using Paperclip for processing domain allow/block imports - stop leaving temporary files - better error handling - assume CSV files are UTF-8-encoded (cherry picked from commit cad824d8f501b95377e4f0a957e5a00d517a1902) Co-authored-by: Levi Bard <taktaktaktaktaktaktaktaktaktak@gmail.com> Co-authored-by: Claire <claire.github-309c@sitedethib.com>
2022-11-17Change automatic post deletion configuration to be accessible to redirected ↵Claire
users (#20774) Fixes #20550
2022-11-17Change batch account suspension to create a strike (#20897)Claire
2022-11-14Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `app/views/admin/announcements/edit.html.haml`: Upstream change too close to theming-related glitch-soc change. Ported upstream changes. - `app/views/admin/announcements/new.html.haml` Upstream change too close to theming-related glitch-soc change. Ported upstream changes.
2022-11-14Fix error when invalid domain name is submitted (#19474)Eugen Rochko
Fix #19175
2022-11-14Fix error when passing unknown filter param in REST API (#20626)Eugen Rochko
Fix #19156
2022-11-14Fix image type not being set after conversion for convertible image types ↵Eugen Rochko
(#20624)
2022-11-14Fix rules with same priority being sorted non-deterministically (#20623)Eugen Rochko
2022-11-12Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `app/models/account.rb`: Conflict because we (glitch-soc) have disabled trending of posts without review. Discarded that upstream change. - `app/views/admin/settings/discovery/show.html.haml`: Just an extra setting in glitch-soc. Kept that extra setting.
2022-11-11Fix trendable status without review (#20214)Jeong Arm
2022-11-11Guard against error extracting `body` from URL (#20428)Emily Strickland
If `Nokogiri::HTML(value).at_xpath('//body')` fails to find the `body` element, it will return `nil`. We can guard against that with an early return. Avoids calling `children` on `Nilclass` in those cases.
2022-11-11Fix metadata scrubbing removing color profile from images (#20389)Eugen Rochko
2022-11-10Remove dead code and refactor status threading code (#20357)Claire
* Remove dead code * Remove unneeded/broken parameters and refactor descendant computation
2022-11-10Change verification to only work for https links (#20304)Eugen Rochko
Fix #20242
2022-11-10Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `app/models/custom_emoji.rb`: Not a real conflict, just upstream changing a line too close to a glitch-soc-specific validation. Applied upstream changes. - `app/models/public_feed.rb`: Not a real conflict, just upstream changing a line too close to a glitch-soc-specific parameter documentation. Applied upstream changes.
2022-11-10Change link verification to ignore IDN domains (#20295)Eugen Rochko
Fix #3833
2022-11-10Improve performance by avoiding regex construction (#20215)James Tucker
```ruby 10.times { p /#{FOO}/.object_id } 10.times { p FOO_RE.object_id } ```
2022-11-10Revert filtering public timelines by locale by default (#20294)Eugen Rochko
2022-11-09Fix being able to spoof link verification (#20217)Eugen Rochko
- Change verification to happen in `default` queue - Change verification worker to only be queued if there's something to do - Add `link` tags from metadata fields to page header of profiles
2022-11-08Merge branch 'main' into glitch-soc/merge-upstreamClaire
2022-11-08Micro-optimization: use `if`/`else` instead of `Array#compact` and ↵Postmodern
`Array#min` (#19906) * Technically `if`/`else` is faster than using `[value1, value2].compact.min` to find the lesser of two values, one of which may be `nil`.
2022-11-07Fix validation error in SynchronizeFeaturedTagsCollectionWorker (#20018)Claire
* Fix followers count not being updated when migrating follows Fixes #19900 * Fix validation error in SynchronizeFeaturedTagsCollectionWorker Also saves remote user's chosen case for hashtags * Limit remote featured tags before validation
2022-11-07Merge branch 'main' into glitch-soc/merge-upstreamClaire
2022-11-07Micro-optimization: only split `acct` into two Strings (#19901)Postmodern
* Since `acct` is split by `@` and assigned to `username` and `domain`, we only need to split `acct` into two Strings.
2022-11-07Merge branch 'main' into glitch-soc/merge-upstreamClaire
2022-11-07Skip Webfinger cache during migrations as well (#19883)nightpool
2022-11-06Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `app/javascript/mastodon/features/compose/components/poll_form.js`: glitch-soc change because of having changed the default number of available poll options. Applied upstream's changes while keeping glitch-soc's default number of poll options. - `public/oops.png`: We had a minor graphics change, probably not worth diverging from upstream. Took upstream version.
2022-11-06Fix not using GIN index for account search queries (#19830)Eugen Rochko
2022-11-04Fix reblogs being discarded after the reblogged status (#19731)Claire
2022-11-04Fix featured tags not saving preferred casing (#19732)Eugen Rochko
2022-11-02Fix inaccurate admin log entry for re-sending confirmation e-mails (#19674)Claire
Fixes #19593
2022-11-01Add support for AVIF uploads (#19647)txt-file
2022-11-01Add support for HEIC uploads (#19618)Eugen Rochko
2022-11-01Change post-processing to be deferred only for large media types (#19617)Eugen Rochko
2022-11-01Change max. thumbnail dimensions to 640x360px (360p) (#19619)Eugen Rochko
2022-10-31Merge branch 'main' into glitch-soc/merge-upstreamClaire
2022-10-30Remove language filtering from hashtag timelines (#19563)Eugen Rochko
2022-10-30Merge branch 'main' into glitch-soc/merge-upstreamClaire
Conflicts: - `app/javascript/mastodon/locales/ja.json`: Upstream change too close to a glitch-soc-specific string. The glitch-soc-specific string should not have been in this file, so it has been moved to `app/javascript/flavours/glitch/locales/ja.js`. - `app/javascript/packs/public.js`: Upstream refactored a part, that as usual is split and duplicated in various pack files. Updated those pack files accordingly. - `app/views/layouts/application.html.haml`: Upstream fixed custom.css path in a different way than we did, went with upstream's change.
2022-10-30Add reputation and followers score boost to SQL-only account search (#19251)Eugen Rochko
2022-10-30Fix account action type validation (#19476)Eugen Rochko
* Fix account action type validation Fix #19143 * Fix #19145 * Fix code style issues
2022-10-30Fix not being able to input featured tag with `#` (#19535)Eugen Rochko
2022-10-29Fix account migration form ever using outdated account data (#18429)Eugen Rochko
2022-10-28Fix domain block export not exporting blocks with only media rejectionClaire
2022-10-28Merge branch 'main' into glitch-soc/merge-upstreamClaire
2022-10-28Merge branch 'main' into glitch-soc/merge-upstreamClaire
2022-10-28Change admin announcement edition interface to use datetime-local (#18321)Claire
* Change admin announcement edition interface to use datetime-local * Dynamically set announcement stop date as required if start date is set, set minimum date for stop date * Change `all_day` to not be bound to presence of time-range * Add pattern and placeholder as minimal fallback for browsers not supporting datetime-local * Display datetime-local inputs as local time Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
2022-10-28Fix using wrong policy on status-related actions in admin UI (#19490)Eugen Rochko
2022-10-27Remove unused method `searchable?` on accounts (#19489)Eugen Rochko
It called the wrong methods, but nothing uses it