Extended-Thunder / send-later

Schedule messages to be sent at a specific time.
Mozilla Public License 2.0
124 stars 17 forks source link

Send Later does the wrong then when a profile somehow ends up with two "outbox" folders #703

Open jikamens opened 7 months ago

jikamens commented 7 months ago

If a profile somehow ends up with two folders with type "outbox", Send Later sometimes puts scheduled messages into the wrong one at delivery time, and they therefore don't get sent.

I think to address this we're going to have to iterate through all local folders to identity all folders of that type, and if there is more than one, use getUnsentMessagesFolder from the sl3u experiment to figure out which is the canonical one and make sure we copy to that one. This could be challenging because folders are represented differently in experiment code from how they're represented in sandboxed add-on code, so we'll have to make sure to do the conversion properly so we can compare the folders we've identified in the add-on code with the folder that getUnsentMessagesFolder returns.