mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 19:18:06 +00:00
Do not send IM notification is the chat message does not have a message id.
This commit is contained in:
parent
9621b080ea
commit
c446f1f424
1 changed files with 6 additions and 1 deletions
|
|
@ -1049,6 +1049,11 @@ static char *linphone_chat_message_create_imdn_xml(LinphoneChatMessage *cm, enum
|
|||
int err;
|
||||
char *content = NULL;
|
||||
char *datetime = NULL;
|
||||
const char *message_id;
|
||||
|
||||
/* Check that the chat message has a message id */
|
||||
message_id = linphone_chat_message_get_message_id(cm);
|
||||
if (message_id == NULL) return NULL;
|
||||
|
||||
buf = xmlBufferCreate();
|
||||
if (buf == NULL) {
|
||||
|
|
@ -1071,7 +1076,7 @@ static char *linphone_chat_message_create_imdn_xml(LinphoneChatMessage *cm, enum
|
|||
err = xmlTextWriterWriteAttributeNS(writer, (const xmlChar *)"xmlns", (const xmlChar *)"linphoneimdn", NULL, (const xmlChar *)"http://www.linphone.org/xsds/imdn.xsd");
|
||||
}
|
||||
if (err >= 0) {
|
||||
err = xmlTextWriterWriteElement(writer, (const xmlChar *)"message-id", (const xmlChar *)linphone_chat_message_get_message_id(cm));
|
||||
err = xmlTextWriterWriteElement(writer, (const xmlChar *)"message-id", (const xmlChar *)message_id);
|
||||
}
|
||||
if (err >= 0) {
|
||||
err = xmlTextWriterWriteElement(writer, (const xmlChar *)"datetime", (const xmlChar *)datetime);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue