* simplify temporary files for thumbnails
Because only a single file will be written to the directory, creating a
separate directory seems unnecessary. If only a temporary file is created,
the code from `createTemp` can be reused here as well.
* refactor: deduplicate code for temporary files/directories
To follow the DRY principle, the same code should not be duplicated
across different files. Instead an already existing function is used.
Because temporary directories are also create in multiple locations,
a function for this is also newly added to reduce duplication.
* fix: clean up identicon temp files
The temporary files for identicons are not reused and can be deleted
after they are fully read. This condition is met when the stream is closed
and so the file can be cleaned up using the events API of the stream.
* fix: ensure cleanup is called when download fails
* fix: ensure cleanup is called in error conditions
This covers import/export queue jobs and is mostly just wrapping all
code in a try...finally statement where the finally runs the cleanup.
* fix: use correct type instead of `any`
The cache implementation did previously not store the results of the
computation and was thus not a cache at all. This can cause a significant
number of database queries each time someone with a large number of
followers does something that causes an activity to be federated.
* fix: handle regex exceptions for word mutes
* add i18n strings
Co-authored-by: rinsuki <428rinsuki+git@gmail.com>
* stricter input validation in backend
* add migration for hard mutes
* fix
* use correct regex library in migration
* use query builder to avoid SQL injection
Co-authored-by: Robin B <robflop98@outlook.com>
Co-authored-by: rinsuki <428rinsuki+git@gmail.com>
* Update ja-JP.yml
* Added settable config for muted instances
* added psql query for removal of muted notes
* Added filtering and trimming for instance mutes
* cleaned up filtering of bad instance mutes and added a refresh at the end for the list on the client
* Added notification & streaming timeline muting
* Updated changelog
* Added missing semicolon
* Apply japanese string suggestions from robflop
Co-authored-by: Robin B. <robflop98@outlook.com>
* Changed Ja-JP instance mute title string to one suggested by sousuke
Co-authored-by: sousuke0422 <sousuke20xx@gmail.com>
* Update ja-JP instanceMuteDescription based on sousuke's suggestion
Co-authored-by: sousuke0422 <sousuke20xx@gmail.com>
* added notification mute
* added notification and note children muting
* Fixed a bug where local notifications were getting filtered on cold start
* Fixed instance mute imports
* Fixed not saving/loading instance mutes
* removed en-US translations for instance mute
* moved instance mute migration to js
* changed settings index back to spaces
* removed destructuring assignment from notification stream in instance mute check call
Co-authored-by: tamaina <tamaina@hotmail.co.jp>
* added .note accessor for checking note data instead of notification data
* changed note to use Packed<'Note'> instead of any and removed usage of snake case
Co-authored-by: tamaina <tamaina@hotmail.co.jp>
* changed notification mute check to check specifically for notification host
* changed to using single quotes
* moved @click to the end for the linter
* revert unnecessary changes
* restored newlines
* whitespace removal
Co-authored-by: syuilo <syuilotan@yahoo.co.jp>
Co-authored-by: Robin B. <robflop98@outlook.com>
Co-authored-by: sousuke0422 <sousuke20xx@gmail.com>
Co-authored-by: puffaboo <emilis@jigglypuff.club>
Co-authored-by: tamaina <tamaina@hotmail.co.jp>