From 7137ca85dc8978c00613488160ec97d307fb90ba Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Thu, 15 Feb 2018 11:11:58 +0100 Subject: [PATCH] Add option to deactivate handling of chat message state by participant in group chat. --- src/chat/chat-message/chat-message.cpp | 6 +++++- tester/group_chat_tester.c | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/chat/chat-message/chat-message.cpp b/src/chat/chat-message/chat-message.cpp index a9f0e5ccc..a254ff42d 100644 --- a/src/chat/chat-message/chat-message.cpp +++ b/src/chat/chat-message/chat-message.cpp @@ -66,7 +66,11 @@ void ChatMessagePrivate::setIsReadOnly (bool readOnly) { void ChatMessagePrivate::setParticipantState (const IdentityAddress &participantAddress, ChatMessage::State newState) { L_Q(); - if (!(q->getChatRoom()->getCapabilities() & AbstractChatRoom::Capabilities::Conference)) { + if (!(q->getChatRoom()->getCapabilities() & AbstractChatRoom::Capabilities::Conference) + || (linphone_config_get_bool(linphone_core_get_config(q->getChatRoom()->getCore()->getCCore()), + "misc", "enable_simple_group_chat_message_state", TRUE + )) + ) { setState(newState); return; } diff --git a/tester/group_chat_tester.c b/tester/group_chat_tester.c index 6c6371e8d..211494d10 100644 --- a/tester/group_chat_tester.c +++ b/tester/group_chat_tester.c @@ -2635,6 +2635,9 @@ static void imdn_for_group_chat_room (void) { linphone_im_notif_policy_enable_all(linphone_core_get_im_notif_policy(marie->lc)); linphone_im_notif_policy_enable_all(linphone_core_get_im_notif_policy(pauline->lc)); linphone_im_notif_policy_enable_all(linphone_core_get_im_notif_policy(chloe->lc)); + linphone_config_set_bool(linphone_core_get_config(marie->lc), "misc", "enable_simple_group_chat_message_state", FALSE); + linphone_config_set_bool(linphone_core_get_config(pauline->lc), "misc", "enable_simple_group_chat_message_state", FALSE); + linphone_config_set_bool(linphone_core_get_config(chloe->lc), "misc", "enable_simple_group_chat_message_state", FALSE); // Marie creates a new group chat room const char *initialSubject = "Colleagues";