/*
* Handles functions related to yellow sticky notes.
*
- * Copyright (c) 2007-2022 by the citadel.org team
+ * Copyright (c) 2007-2023 by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3.
#include <string.h>
#include <limits.h>
#include <libcitadel.h>
-#include "../../citadel.h"
+#include "../../citadel_defs.h"
#include "../../server.h"
#include "../../citserver.h"
#include "../../support.h"
* any existing message containing that UUID.
*/
strcpy(uuid, "");
- p = msg->cm_fields[eMesageText];
- a = msg->cm_lengths[eMesageText];
+ p = msg->cm_fields[eMessageText];
+ a = msg->cm_lengths[eMessageText];
while (--a > 0) {
if (!strncasecmp(p, "X-KOrg-Note-Id: ", 16)) { /* Found it */
safestrncpy(uuid, p + 16, sizeof(uuid));
syslog(LOG_DEBUG, "UUID of note is: %s\n", uuid);
if (!IsEmptyStr(uuid)) {
- CM_SetField(msg, eExclusiveID, uuid, strlen(uuid));
+ CM_SetField(msg, eExclusiveID, uuid);
CM_CopyField(msg, eMsgSubject, eExclusiveID);
}
/* Modern clients are using vNote format. Check for one... */
- mime_parser(CM_RANGE(msg, eMesageText),
+ mime_parser(CM_RANGE(msg, eMessageText),
*notes_extract_vnote,
NULL, NULL,
&v, /* user data ptr - put the vnote here */
if ((v->uid) && (!IsEmptyStr(v->uid))) {
syslog(LOG_DEBUG, "UID of vNote is: %s\n", v->uid);
- CM_SetField(msg, eExclusiveID, v->uid, strlen(v->uid));
+ CM_SetField(msg, eExclusiveID, v->uid);
}
/* Set the message Subject to the vNote Summary */
if ((v->summary) && (!IsEmptyStr(v->summary))) {
- CM_SetField(msg, eMsgSubject, v->summary, strlen(v->summary));
+ CM_SetField(msg, eMsgSubject, v->summary);
if (msg->cm_lengths[eMsgSubject] > 72) {
strcpy(&msg->cm_fields[eMsgSubject][68], "...");