polyamspace / mastodon

Custom Mastodon fork used by https://polyam.space
GNU Affero General Public License v3.0
1 stars 2 forks source link

Use constant for instance filter instead of magic number #514

Closed polyamAdmin closed 4 months ago

polyamAdmin commented 4 months ago

Follow-up to #228

Add a constant for the instance filter id and use instead actor id constant to create the filter. This has the benefit of not having to look up the id unnecessarily in the db.

Also uses the new constant in some places as the filter doesn't need to exist in them.

Fixes system specs.

polyamAdmin commented 4 months ago

I feel uneasy about removing the check for the instance filter in filters_spec, but the filter doesn't necessarily exist in that context anymore causing a failure. It still works though. Still not a fan of the delay.