imnaK / quantum

A "Better Discord" plugin for message encryption/decryption
GNU General Public License v3.0
3 stars 0 forks source link

Add Encryption for Messages with Attachments #6

Closed Traube1000101 closed 6 months ago

Traube1000101 commented 6 months ago

Objective

The goal of this task is to rectify a current issue with the message encryption. Currently when a message includes an attachment (such as a file or image), it does not get encrypted despite the prefix being prepended.

Implementation

This will require to patch a different function, which handles the upload of attachments and the dispatching of those messages.

Traube1000101 commented 6 months ago

With commit 849babde35332e4089adfd1b98a2e9f3a7f1993e, a patch function for the uploadFiles module was implemented and the handleMessageSend function was adapted accordingly. Messages sent with files, images or videos attached to them now also get encrypted! Additionally the patch and unpatch functions got rearranged and optimized.