]> code.citadel.org Git - citadel.git/blobdiff - citadel/msgbase.c
IMPORTANT FIX TO VCARD / GLOBAL ADDRESS BOOK ROOM. VERSION UPDATE TO 8.03. DEPLOY...
[citadel.git] / citadel / msgbase.c
index a58093bbe38e6197b66f4dd0f2b2ca473eb2d9ce..68c94cca054f6794f839db089562124a0a1ea113 100644 (file)
@@ -3210,21 +3210,25 @@ long CtdlSubmitMsg(struct CtdlMessage *msg,     /* message to save */
                                        imsg->cm_fields['A'] = strdup("Citadel");
                                        imsg->cm_fields['J'] = strdup("do not journal");
                                        imsg->cm_fields['M'] = instr;   /* imsg owns this memory now */
-                                       imsg->cm_fields['W'] = strdup(recipient);
+                                       imsg->cm_fields['2'] = strdup(recipient);
                                        CtdlSubmitMsg(imsg, NULL, FNBL_QUEUE_ROOM, 0);
                                        CtdlFreeMessage(imsg);
                                }
                        }
                        else {
                                syslog(LOG_DEBUG, "No user <%s>\n", recipient);
-                               CtdlSaveMsgPointerInRoom(config.c_aideroom,
-                                                        newmsgid, 0, msg);
+                               CtdlSaveMsgPointerInRoom(config.c_aideroom, newmsgid, 0, msg);
                        }
                }
 
        /* Perform "after save" hooks */
        syslog(LOG_DEBUG, "Performing after-save hooks\n");
+       if (msg->cm_fields['3'] != NULL) free(msg->cm_fields['3']);
+       msg->cm_fields['3'] = malloc(20);
+       snprintf(msg->cm_fields['3'], 20, "%ld", newmsgid);
        PerformMessageHooks(msg, EVT_AFTERSAVE);
+       free(msg->cm_fields['3']);
+       msg->cm_fields['3'] = NULL;
 
        /* For IGnet mail, we have to save a new copy into the spooler for
         * each recipient, with the R and D fields set to the recipient and