Fixed imap_append() from clearing all flags on messages and avoid purge_user() from...
authorHarlow Solutions <citadel@harlowsolutions.com>
Fri, 2 Jun 2023 15:45:58 +0000 (11:45 -0400)
committerHarlow Solutions <citadel@harlowsolutions.com>
Fri, 2 Jun 2023 15:45:58 +0000 (11:45 -0400)
commit51eb00586bbf10c5aee14b35f38bee5d5ada4cbd
tree80adb6135fc6e272081201758d76464dc353c856
parentc6449196d944daa92bae99cc5bbab8d4d87ee93c
Fixed imap_append() from clearing all flags on messages and avoid purge_user() from purging the wrong Visit records.

imap_misc.c: imap_append() was trying to append the flags after the room had been restored to the original room, so all flags in the room were being cleared.  Moved imap_do_append_flags() before the room was changed back.

user_ops.c: purge_user() was assuming that the first part of the key for Visit records was the user number.  Actually is the room number so was removing records where the room and user numbers matched.  A solution is to go through all the Visit records and delete, but not worth it.  Auto-Purge will clean up the records later.  Future: When expanded IMAP flagging is added, we will move the user number to the top of the key and reactivate the existing method.

ctdl3264_prep.sh: Build fix to support ‘tail’ command version differences for + option.  CentOS/Rocky Linux needs -n option added for command not to error.  Now tests command and sets the proper option to work.
citadel/server/modules/imap/imap_misc.c
citadel/server/user_ops.c
citadel/utils/ctdl3264_prep.sh