Skip to content

delete old emoji file when replaced - fixes #608

dakkar requested to merge feature/608-delete-file-on-emoji-update into develop

What does this PR do?

When updating a custom emoji, if the actual image has been changed, delete the previous file.

It's the same code that 5f7fc54e added to delete and deleteBulk, with the extra check that we're not deleting the same file we're setting.

As with delete, there is a small risk of deleting a file that's actually in use, because a drive file can be attached to a note and used as a profile icon and also as an emoji… Should we check this?

Contribution Guidelines By submitting this merge request, you agree to follow our Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines
  • I have made sure to test this pull request

Merge request reports