diff --git a/coreapi/friendlist.c b/coreapi/friendlist.c index a29254aece7af8f03acf6d314dda56c9992e1a0d..e9895e1c6f753e1c7e1a225dd0594edbc61715dd 100644 --- a/coreapi/friendlist.c +++ b/coreapi/friendlist.c @@ -770,7 +770,6 @@ _linphone_friend_list_remove_friend(LinphoneFriendList *list, LinphoneFriend *lf if (elem == NULL) return LinphoneFriendListNonExistentFriend; #if defined(HAVE_SQLITE) && defined(VCARD_ENABLED) - if (lf && lf->lc && linphone_friend_list_database_storage_enabled(list)) { linphone_core_remove_friend_from_db(lf->lc, lf); } diff --git a/include/linphone/api/c-push-notification-message.h b/include/linphone/api/c-push-notification-message.h index 3699a4633033d771bf36d86b0d10a6cf00bf3f76..cf4933de5a7161a67de452f192567d1b851bdee2 100644 --- a/include/linphone/api/c-push-notification-message.h +++ b/include/linphone/api/c-push-notification-message.h @@ -114,6 +114,14 @@ linphone_push_notification_message_get_local_addr(const LinphonePushNotification LINPHONE_PUBLIC const LinphoneAddress * linphone_push_notification_message_get_peer_addr(const LinphonePushNotificationMessage *message); +/** + * Gets the reaction content. + * @param message The #LinphonePushNotificationMessage object @notnil + * @return The reaction content or NULL. @maybenil + */ +LINPHONE_PUBLIC const char * +linphone_push_notification_message_get_reaction_content(const LinphonePushNotificationMessage *message); + /** * Tells whether or not this message contains an icalendar by checking it's content type. * @param message The #LinphonePushNotificationMessage object @notnil diff --git a/include/linphone/core.h b/include/linphone/core.h index a25af79f56ff0dece0a889e8929a922a015469a0..6f0d74c38dba1bf8e5341a2b20c6aeed009f6427 100644 --- a/include/linphone/core.h +++ b/include/linphone/core.h @@ -595,6 +595,8 @@ LINPHONE_PUBLIC LinphoneCoreCbsMessageReceivedCb linphone_core_cbs_get_message_r LINPHONE_PUBLIC void linphone_core_cbs_set_new_message_reaction(LinphoneCoreCbs *cbs, LinphoneCoreCbsNewMessageReactionCb cb); +void linphone_core_cbs_set_reaction_removed_private(LinphoneCoreCbs *cbs, LinphoneCoreCbsReactionRemovedPrivateCb cb); + /** * Get the #LinphoneCoreCbsNewMessageReactionCb callback. * @param cbs A #LinphoneCoreCbs. @notnil diff --git a/src/c-wrapper/api/c-push-notification-message.cpp b/src/c-wrapper/api/c-push-notification-message.cpp index f843075d7a608ed8b6288f558aa8e7fb560dfce7..280e4feed70acaefa1ef67f87d7e9cd571ab2f99 100644 --- a/src/c-wrapper/api/c-push-notification-message.cpp +++ b/src/c-wrapper/api/c-push-notification-message.cpp @@ -31,13 +31,14 @@ LinphonePushNotificationMessage *linphone_push_notification_message_new(const ch const char *from_addr, const char *local_addr, const char *peer_addr, + const char *reaction_content, bool_t is_icalendar, bool_t is_conference_invitation_new, bool_t is_conference_invitation_update, bool_t is_conference_invitation_cancellation) { return PushNotificationMessage::createCObject( - call_id ? call_id : "", is_text, text_content ? text_content : "", subject ? subject : "", - from_addr ? from_addr : "", local_addr ? local_addr : "", peer_addr ? peer_addr : "", is_icalendar, + L_C_TO_STRING(call_id), is_text, L_C_TO_STRING(text_content), L_C_TO_STRING(subject), L_C_TO_STRING(from_addr), + L_C_TO_STRING(local_addr), L_C_TO_STRING(peer_addr), L_C_TO_STRING(reaction_content), is_icalendar, is_conference_invitation_new, is_conference_invitation_update, is_conference_invitation_cancellation); } @@ -56,8 +57,7 @@ void linphone_push_notification_message_unref(LinphonePushNotificationMessage *m } const char *linphone_push_notification_message_get_call_id(const LinphonePushNotificationMessage *msg) { - const char *call_id = PushNotificationMessage::toCpp(msg)->getCallId().c_str(); - return strlen(call_id) != 0 ? call_id : NULL; + return L_STRING_TO_C(PushNotificationMessage::toCpp(msg)->getCallId()); } bool_t linphone_push_notification_message_is_text(const LinphonePushNotificationMessage *msg) { @@ -65,13 +65,12 @@ bool_t linphone_push_notification_message_is_text(const LinphonePushNotification } const char *linphone_push_notification_message_get_text_content(const LinphonePushNotificationMessage *msg) { - const char *text = PushNotificationMessage::toCpp(msg)->getTextContent().c_str(); - return strlen(text) != 0 ? text : NULL; + return L_STRING_TO_C(PushNotificationMessage::toCpp(msg)->getTextContent()); } const char *linphone_push_notification_message_get_subject(const LinphonePushNotificationMessage *msg) { - const char *subject = PushNotificationMessage::toCpp(msg)->getSubject().c_str(); - return strlen(subject) != 0 ? subject : NULL; + + return L_STRING_TO_C(PushNotificationMessage::toCpp(msg)->getSubject()); } const LinphoneAddress *linphone_push_notification_message_get_from_addr(const LinphonePushNotificationMessage *msg) { @@ -86,6 +85,10 @@ const LinphoneAddress *linphone_push_notification_message_get_peer_addr(const Li return PushNotificationMessage::toCpp(msg)->getPeerAddr()->toC(); } +const char *linphone_push_notification_message_get_reaction_content(const LinphonePushNotificationMessage *msg) { + return L_STRING_TO_C(PushNotificationMessage::toCpp(msg)->getReactionContent()); +} + bool_t linphone_push_notification_message_is_icalendar(const LinphonePushNotificationMessage *msg) { return PushNotificationMessage::toCpp(msg)->isIcalendar(); } diff --git a/src/core/shared-core-helpers/ios-shared-core-helpers.mm b/src/core/shared-core-helpers/ios-shared-core-helpers.mm index 062d0e3dc3606d2074899e95d807893ca88e2a9b..6c9e63180be18661d37171259c66ae43a6f2430c 100644 --- a/src/core/shared-core-helpers/ios-shared-core-helpers.mm +++ b/src/core/shared-core-helpers/ios-shared-core-helpers.mm @@ -104,6 +104,7 @@ public: void reinitTimer(); void putMsgInUserDefaults(LinphoneChatMessage *msg); + void putReactionInUserDefaults(LinphoneCore *lc, LinphoneChatMessage *msg, const LinphoneChatMessageReaction *reaction, const LinphoneAddress *address, const char *callIdNoReaction); void onMsgWrittenInUserDefaults() override; SharedCoreState getSharedCoreState() override; @@ -211,13 +212,49 @@ static void on_push_notification_message_received(LinphoneCore *lc, LinphoneChat } } -static void on_push_notification_reaction_to_message_received(LinphoneChatMessage *msg, const LinphoneChatMessageReaction *reaction) { - const char *callId = linphone_chat_message_reaction_get_call_id(reaction); - // TODO: do like in putMsgInUserDefaults +static void on_push_notification_reaction_to_message_received(LinphoneCore *lc, LinphoneChatRoom *room, LinphoneChatMessage *message, const LinphoneChatMessageReaction *reaction) { + const LinphoneAddress *from = NULL; + LinphoneAccount *account = NULL; + account = linphone_core_get_default_account(lc); + + if ((account != NULL)) { + const LinphoneAccountParams *account_params = linphone_account_get_params(account); + from = linphone_account_params_get_identity_address(account_params); + } + + if (linphone_chat_message_reaction_get_body(reaction) && from != NULL && !(Address::toCpp(from)->weakEqual(*Address::toCpp(linphone_chat_message_reaction_get_from_address(reaction)))) ){ + lInfo() << "[push] reaction [" << reaction << "] received from msg [" << message << "]"; + PlatformHelpers *platform_helper = static_cast<LinphonePrivate::PlatformHelpers*>(lc->platform_helper); + IosSharedCoreHelpers *shared_core_helper = static_cast<LinphonePrivate::IosSharedCoreHelpers*>(platform_helper->getSharedCoreHelpers().get()); + + shared_core_helper->putReactionInUserDefaults(lc, message, reaction, NULL, NULL); + const char *callId = linphone_chat_message_reaction_get_call_id(reaction); + static_cast<LinphonePrivate::IosSharedCoreHelpers*>(lc->platform_helper)->removeCallIdFromList(callId); + } else { + lInfo() << "[push] don't put msg [" << message << "] in UserDefaults because the reaction is empty or the user is the sender (no notification for himself)"; + } } -static void on_push_notification_reaction_to_message_removed(LinphoneChatMessage *message, const LinphoneAddress *address, const char *callId) { - // TODO: don't wait for chat message to arrive +static void on_push_notification_reaction_to_message_removed(LinphoneCore *lc, LinphoneChatRoom *room, LinphoneChatMessage *message, const LinphoneAddress *address, const char *callId) { + const LinphoneAddress *from = NULL; + LinphoneAccount *account = NULL; + account = linphone_core_get_default_account(lc); + + if ((account != NULL)) { + const LinphoneAccountParams *account_params = linphone_account_get_params(account); + from = linphone_account_params_get_identity_address(account_params); + } + + if (from != NULL && !(Address::toCpp(from)->weakEqual(*Address::toCpp(address))) ){ + lInfo() << "[push] callId [" << callId << "] received from msg [" << message << "]"; + PlatformHelpers *platform_helper = static_cast<LinphonePrivate::PlatformHelpers*>(lc->platform_helper); + IosSharedCoreHelpers *shared_core_helper = static_cast<LinphonePrivate::IosSharedCoreHelpers*>(platform_helper->getSharedCoreHelpers().get()); + + shared_core_helper->putReactionInUserDefaults(lc, message, NULL, address, callId); + static_cast<LinphonePrivate::IosSharedCoreHelpers*>(lc->platform_helper)->removeCallIdFromList(callId); + } else { + lInfo() << "[push] don't put msg [" << message << "] in UserDefaults because the user is the sender (no notification for himself)"; + } } void IosSharedCoreHelpers::registerSharedCoreMsgCallback() { @@ -225,8 +262,8 @@ void IosSharedCoreHelpers::registerSharedCoreMsgCallback() { lInfo() << "[push] register shared core msg callback"; LinphoneCoreCbs *cbs = linphone_factory_create_core_cbs(linphone_factory_get()); linphone_core_cbs_set_message_received(cbs, on_push_notification_message_received); - linphone_chat_message_cbs_set_new_message_reaction(cbs, on_push_notification_reaction_to_message_received); - linphone_chat_message_cbs_set_reaction_removed_private(cbs, on_push_notification_reaction_to_message_removed); + linphone_core_cbs_set_new_message_reaction(cbs, on_push_notification_reaction_to_message_received); + linphone_core_cbs_set_reaction_removed_private(cbs, on_push_notification_reaction_to_message_removed); linphone_core_add_callbacks(getCore()->getCCore(), cbs); linphone_core_cbs_unref(cbs); } @@ -356,7 +393,9 @@ void IosSharedCoreHelpers::putMsgInUserDefaults(LinphoneChatMessage *msg) { NSNumber *isText = [NSNumber numberWithBool:((BOOL) linphone_chat_message_is_text(msg))]; const char *cTextContent = linphone_chat_message_get_utf8_text(msg); + const char *cReactionContent = nil; NSString *textContent = [NSString stringWithUTF8String: cTextContent ? cTextContent : ""]; + NSString *reactionContent = [NSString stringWithUTF8String: cReactionContent ? cReactionContent : ""]; NSString *subject; LinphoneChatRoomCapabilitiesMask capabilities = linphone_chat_room_get_capabilities(linphone_chat_message_get_chat_room(msg)); if (capabilities & LinphoneChatRoomCapabilitiesOneToOne) { @@ -382,8 +421,8 @@ void IosSharedCoreHelpers::putMsgInUserDefaults(LinphoneChatMessage *msg) { subject = [NSString stringWithUTF8String:linphone_conference_info_get_subject(conferenceInfo)]; } - NSDictionary *newMsg = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:isText, textContent, subject, fromAddr, localAddr, peerAddr, ttl, isIcalendar, isConferenceInvitationNew, isConferenceInvitationUpdate, isConferenceInvitationCancellation, nil] - forKeys:[NSArray arrayWithObjects:@"isText", @"textContent", @"subject", @"fromAddr", @"localAddr", @"peerAddr", @"ttl", @"isIcalendar", @"isConferenceInvitationNew", @"isConferenceInvitationUpdate", @"isConferenceInvitationCancellation", nil]]; + NSDictionary *newMsg = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:isText, textContent, subject, fromAddr, localAddr, peerAddr, ttl, reactionContent, isIcalendar, isConferenceInvitationNew, isConferenceInvitationUpdate, isConferenceInvitationCancellation, nil] + forKeys:[NSArray arrayWithObjects:@"isText", @"textContent", @"subject", @"fromAddr", @"localAddr", @"peerAddr", @"ttl", @"reactionContent", @"isIcalendar", @"isConferenceInvitationNew", @"isConferenceInvitationUpdate", @"isConferenceInvitationCancellation", nil]]; [messages setObject:newMsg forKey:callId]; [defaults setObject:messages forKey:@"messages"]; @@ -394,6 +433,66 @@ void IosSharedCoreHelpers::putMsgInUserDefaults(LinphoneChatMessage *msg) { if (getSharedCoreState() == mainCoreStarted) notifyMessageReceived(linphone_chat_message_get_call_id(msg)); } +void IosSharedCoreHelpers::putReactionInUserDefaults(LinphoneCore *lc, LinphoneChatMessage *msg, const LinphoneChatMessageReaction *reaction, const LinphoneAddress *address, const char *callIdNoReaction) { + lInfo() << "[push] " << __FUNCTION__ << " reaction: [" << reaction << "]"; + + NSUserDefaults *defaults = [[NSUserDefaults alloc] initWithSuiteName:@(mAppGroupId.c_str())]; + NSMutableDictionary *messages; + + NSDictionary *msgDictionary = [defaults dictionaryForKey:@"messages"]; + if (msgDictionary == nil) { + messages = [[NSMutableDictionary alloc] init]; + } else { + messages = [[NSMutableDictionary alloc] initWithDictionary:msgDictionary]; + } + + NSString *callId = [NSString stringWithUTF8String: reaction != nil ? linphone_chat_message_reaction_get_call_id(reaction) : callIdNoReaction]; + + NSNumber *isText = [NSNumber numberWithBool:((BOOL) linphone_chat_message_is_text(msg))]; + const char *cTextContent = linphone_chat_message_get_utf8_text(msg); + const char *cReactionContent = reaction != nil ? linphone_chat_message_reaction_get_body(reaction) : nil; + NSString *textContent = [NSString stringWithUTF8String: cTextContent ? cTextContent : ""]; + NSString *reactionContent = [NSString stringWithUTF8String: cReactionContent ? cReactionContent : " "]; + NSString *subject; + LinphoneChatRoomCapabilitiesMask capabilities = linphone_chat_room_get_capabilities(linphone_chat_message_get_chat_room(msg)); + if (capabilities & LinphoneChatRoomCapabilitiesOneToOne) { + subject = @""; + } else { + const char *cSubject = linphone_chat_room_get_subject(linphone_chat_message_get_chat_room(msg)); + subject = [NSString stringWithUTF8String: cSubject ? cSubject : ""]; + } + const LinphoneAddress *cFromAddr = reaction != nil ? linphone_chat_message_reaction_get_from_address(reaction) : address; + const LinphoneAddress *cLocalAddr = linphone_chat_message_get_local_address(msg); + const LinphoneAddress *cPeerAddr = linphone_chat_message_get_peer_address(msg); + NSString *fromAddr = [NSString stringWithUTF8String:linphone_address_as_string(cFromAddr)]; + NSString *localAddr = [NSString stringWithUTF8String:linphone_address_as_string(cLocalAddr)]; + NSString *peerAddr = [NSString stringWithUTF8String:linphone_address_as_string(cPeerAddr)]; + NSNumber *ttl = [NSNumber numberWithUnsignedLongLong:ms_get_cur_time_ms()]; + NSNumber *isIcalendar = [NSNumber numberWithBool: (BOOL)linphone_chat_message_has_conference_invitation_content(msg)]; + LinphoneConferenceInfo *conferenceInfo = isIcalendar ? getConferenceInfo(msg) : nil; + NSNumber *isConferenceInvitationNew = isIcalendar && conferenceInfo ? [NSNumber numberWithBool:linphone_conference_info_get_state(conferenceInfo) == LinphoneConferenceInfoStateNew] : [NSNumber numberWithBool:false]; + NSNumber *isConferenceInvitationUpdate = isIcalendar && conferenceInfo ? [NSNumber numberWithBool:linphone_conference_info_get_state(conferenceInfo) == LinphoneConferenceInfoStateUpdated] : [NSNumber numberWithBool:false]; + NSNumber *isConferenceInvitationCancellation = isIcalendar && conferenceInfo ? [NSNumber numberWithBool:linphone_conference_info_get_state(conferenceInfo) == LinphoneConferenceInfoStateCancelled] : [NSNumber numberWithBool:false]; + if (isIcalendar && conferenceInfo && linphone_conference_info_get_subject(conferenceInfo)) { + subject = [NSString stringWithUTF8String:linphone_conference_info_get_subject(conferenceInfo)]; + } + + NSDictionary *newMsg = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:isText, textContent, subject, fromAddr, localAddr, peerAddr, ttl, reactionContent, isIcalendar, isConferenceInvitationNew, isConferenceInvitationUpdate, isConferenceInvitationCancellation, nil] + forKeys:[NSArray arrayWithObjects:@"isText", @"textContent", @"subject", @"fromAddr", @"localAddr", @"peerAddr", @"ttl", @"reactionContent", @"isIcalendar", @"isConferenceInvitationNew", @"isConferenceInvitationUpdate", @"isConferenceInvitationCancellation", nil]]; + + [messages setObject:newMsg forKey:callId]; + [defaults setObject:messages forKey:@"messages"]; + if (reaction != nil) { + lInfo() << "[push] add " << linphone_chat_message_reaction_get_call_id(reaction) << " into UserDefaults[messages]. nb of msg:" << [messages count]; + } else { + lInfo() << "[push] add " << callIdNoReaction << " into UserDefaults[messages]. nb of msg:" << [messages count]; + } + + [defaults release]; + + if (getSharedCoreState() == mainCoreStarted) notifyMessageReceived(reaction != nil ? linphone_chat_message_reaction_get_call_id(reaction) : callIdNoReaction); +} + shared_ptr<PushNotificationMessage> IosSharedCoreHelpers::fetchUserDefaultsMsg(const string &callId) { bool isText; string textContent; @@ -401,6 +500,7 @@ shared_ptr<PushNotificationMessage> IosSharedCoreHelpers::fetchUserDefaultsMsg(c string fromAddr; string localAddr; string peerAddr; + string reactionContent; bool isIcalendar; bool isConferenceInvitationNew; bool isConferenceInvitationUpdate; @@ -428,6 +528,7 @@ shared_ptr<PushNotificationMessage> IosSharedCoreHelpers::fetchUserDefaultsMsg(c fromAddr = [[NSString stringWithString:msgData[@"fromAddr"]] UTF8String]; localAddr = [[NSString stringWithString:msgData[@"localAddr"]] UTF8String]; peerAddr = [[NSString stringWithString:msgData[@"peerAddr"]] UTF8String]; + reactionContent = [[NSString stringWithString:msgData[@"reactionContent"]] UTF8String]; isIcalendar = [msgData[@"isIcalendar"] boolValue]; isConferenceInvitationNew = [msgData[@"isConferenceInvitationNew"] boolValue]; isConferenceInvitationUpdate = [msgData[@"isConferenceInvitationUpdate"] boolValue]; @@ -438,7 +539,7 @@ shared_ptr<PushNotificationMessage> IosSharedCoreHelpers::fetchUserDefaultsMsg(c [defaults setObject:messages forKey:@"messages"]; [defaults release]; - shared_ptr<PushNotificationMessage> msg = PushNotificationMessage::create(callId, isText, textContent, subject, fromAddr, localAddr, peerAddr, isIcalendar, isConferenceInvitationNew, isConferenceInvitationUpdate, isConferenceInvitationCancellation); + shared_ptr<PushNotificationMessage> msg = PushNotificationMessage::create(callId, isText, textContent, subject, fromAddr, localAddr, peerAddr, reactionContent, isIcalendar, isConferenceInvitationNew, isConferenceInvitationUpdate, isConferenceInvitationCancellation); return msg; } diff --git a/src/push-notification-message/push-notification-message.cpp b/src/push-notification-message/push-notification-message.cpp index 29ca164ca72f499650c90887ad080364898284ad..151b04c767efaed1f04a01f65b2fee08820ef2f8 100644 --- a/src/push-notification-message/push-notification-message.cpp +++ b/src/push-notification-message/push-notification-message.cpp @@ -31,12 +31,13 @@ PushNotificationMessage::PushNotificationMessage(const std::string &callId, const std::string &fromAddr, const std::string &localAddr, const std::string &peerAddr, + const std::string &reactionContent, bool isIcalendar, bool isConferenceInvitationNew, bool isConferenceInvitationUpdate, bool isConferenceInvitationCancellation) { - PushNotificationMessage::init(callId, isText, textContent, subject, fromAddr, localAddr, peerAddr, isIcalendar, - isConferenceInvitationNew, isConferenceInvitationUpdate, + PushNotificationMessage::init(callId, isText, textContent, subject, fromAddr, localAddr, peerAddr, reactionContent, + isIcalendar, isConferenceInvitationNew, isConferenceInvitationUpdate, isConferenceInvitationCancellation); } @@ -47,6 +48,7 @@ void PushNotificationMessage::init(const std::string &callId, const std::string &fromAddr, const std::string &localAddr, const std::string &peerAddr, + const std::string &reactionContent, bool isIcalendar, bool isConferenceInvitationNew, bool isConferenceInvitationUpdate, @@ -58,6 +60,7 @@ void PushNotificationMessage::init(const std::string &callId, mFromAddr = (new Address(fromAddr))->toSharedPtr(); mLocalAddr = (new Address(localAddr))->toSharedPtr(); mPeerAddr = (new Address(peerAddr))->toSharedPtr(); + mReactionContent = reactionContent; mIsIcalendar = isIcalendar; mIsConferenceInvitationNew = isConferenceInvitationNew; mIsConferenceInvitationUpdate = isConferenceInvitationUpdate; @@ -91,6 +94,10 @@ shared_ptr<const Address> PushNotificationMessage::getPeerAddr() const { return mPeerAddr; } +const string &PushNotificationMessage::getReactionContent() const { + return mReactionContent; +} + bool PushNotificationMessage::isIcalendar() const { return mIsIcalendar; } @@ -117,6 +124,7 @@ std::string PushNotificationMessage::toString() const { ss << "fromAddr[" << mFromAddr << "] "; ss << "localAddr[" << mLocalAddr << "] "; ss << "peerAddr[" << mPeerAddr << "] "; + ss << "reactionContent[" << mReactionContent << "] "; ss << "isIcalendar[" << mIsIcalendar << "] "; ss << "isConferenceInvitationUpdate[" << mIsConferenceInvitationUpdate << "] "; ss << "isConferenceInvitationCancellation[" << mIsConferenceInvitationCancellation << "] "; diff --git a/src/push-notification-message/push-notification-message.h b/src/push-notification-message/push-notification-message.h index b512afa6427cd7e88d53ed41c49c88f2fa51950c..e04e40f891f42c7e3a6d7baf4229352f5d81b44f 100644 --- a/src/push-notification-message/push-notification-message.h +++ b/src/push-notification-message/push-notification-message.h @@ -36,6 +36,7 @@ public: const std::string &fromAddr, const std::string &localAddr, const std::string &peerAddr, + const std::string &reactionContent, bool isIcalendar, bool isConferenceInvitationNew, bool isConferenceInvitationUpdate, @@ -48,6 +49,7 @@ public: const std::string &fromAddr, const std::string &localAddr, const std::string &peerAddr, + const std::string &reactionContent, bool isIcalendar, bool isConferenceInvitationNew, bool isConferenceInvitationUpdate, @@ -60,6 +62,7 @@ public: std::shared_ptr<const Address> getFromAddr() const; std::shared_ptr<const Address> getLocalAddr() const; std::shared_ptr<const Address> getPeerAddr() const; + const std::string &getReactionContent() const; bool isIcalendar() const; bool isConferenceInvitationNew() const; bool isConferenceInvitationUpdate() const; @@ -75,6 +78,7 @@ private: std::shared_ptr<Address> mFromAddr; std::shared_ptr<Address> mLocalAddr; std::shared_ptr<Address> mPeerAddr; + std::string mReactionContent; bool mIsIcalendar = false; bool mIsConferenceInvitationNew = false; bool mIsConferenceInvitationUpdate = false; diff --git a/tester/message_tester.c b/tester/message_tester.c index f45dee002b1c0f0a866fd30336920de9ab80bc13..553fc0ee93c111f4ca1506e19ef1e6ae5a828c2a 100644 --- a/tester/message_tester.c +++ b/tester/message_tester.c @@ -438,7 +438,7 @@ void check_reactions(LinphoneChatMessage *message, const char *reaction_body = linphone_chat_message_reaction_get_body(reaction); BC_ASSERT_STRING_EQUAL(reaction_body, expected_reaction); - const char *reaction_call_id = linphone_chat_message_get_call_id(reaction); + const char *reaction_call_id = linphone_chat_message_reaction_get_call_id(reaction); BC_ASSERT_PTR_NOT_NULL(reaction_call_id); const LinphoneAddress *from = linphone_chat_message_reaction_get_from_address(reaction);