Skip to content
Snippets Groups Projects
Commit aaa6fa7e authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Call smb_updatethread() from sbbs_t::email() to perform Keyop "magic"

As discovered by Keyop and reported via IRC, when replying *to* a local mail box and *not* using the hard-coded email menu (e.g. when when using msglist.js), the original message's "Replied" attribute flag was not set. When replying to a netmail address (at least, Internet or FidoNet, unsure about QWKnetmail), the attribute would be set.

This discrepancy was because this email() function doesn't use the  "modern" smb_addmsg() function (which also calls smb_updatethread()), but add the message body text the old/manual way and never called smb_updatethread(). smb_updatethread() does the thread linkage stuff (which is usually unnoticed in the mail base) *and* sets the "Replied" attribute of the original message, if it's not already set.

This function should be overhauled to use smb_addmsg(), but this 2-line change at least addresses this issue for now. There's probably other places (e.g. importing mail replies via QWK/REP packets) where this thread-linkage and "Replied" attribute flag setting is still not happening.
parent 4e61b7ba
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #2432 passed
......@@ -303,6 +303,8 @@ bool sbbs_t::email(int usernumber, const char *top, const char *subj, long mode,
smb_dfield(&msg,TEXT_BODY,length);
i=smb_addmsghdr(&smb,&msg,smb_storage_mode(&cfg, &smb)); // calls smb_unlocksmbhdr()
if(i == SMB_SUCCESS && remsg != NULL)
smb_updatethread(&smb, remsg, msg.hdr.number);
smb_close(&smb);
smb_stack(&smb,SMB_STACK_POP);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment