mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-19 03:58:08 +00:00
fix(c-chat-room): delete correctly chat message
This commit is contained in:
parent
52d7652e28
commit
cea7ca8bb1
3 changed files with 7 additions and 7 deletions
|
|
@ -23,8 +23,9 @@
|
|||
#include "linphone/api/c-chat-room.h"
|
||||
#include "linphone/wrapper_utils.h"
|
||||
|
||||
#include "c-wrapper/c-wrapper.h"
|
||||
#include "address/identity-address.h"
|
||||
#include "c-wrapper/c-wrapper.h"
|
||||
#include "chat/chat-message/chat-message-p.h"
|
||||
#include "chat/chat-room/basic-chat-room.h"
|
||||
#include "chat/chat-room/client-group-chat-room.h"
|
||||
#include "chat/chat-room/real-time-text-chat-room-p.h"
|
||||
|
|
@ -183,7 +184,11 @@ int linphone_chat_room_get_history_size (LinphoneChatRoom *cr) {
|
|||
}
|
||||
|
||||
void linphone_chat_room_delete_message (LinphoneChatRoom *cr, LinphoneChatMessage *msg) {
|
||||
L_GET_CPP_PTR_FROM_C_OBJECT(cr)->deleteMessage(L_GET_CPP_PTR_FROM_C_OBJECT(msg));
|
||||
shared_ptr<LinphonePrivate::EventLog> event = LinphonePrivate::MainDb::getEventFromKey(
|
||||
L_GET_PRIVATE_FROM_C_OBJECT(msg)->dbKey
|
||||
);
|
||||
if (event)
|
||||
LinphonePrivate::EventLog::deleteFromDatabase(event);
|
||||
}
|
||||
|
||||
void linphone_chat_room_delete_history (LinphoneChatRoom *cr) {
|
||||
|
|
|
|||
|
|
@ -383,10 +383,6 @@ void ChatRoom::deleteHistory () {
|
|||
// TODO: history.
|
||||
}
|
||||
|
||||
void ChatRoom::deleteMessage (const shared_ptr<ChatMessage> &msg) {
|
||||
// TODO: history.
|
||||
}
|
||||
|
||||
shared_ptr<ChatMessage> ChatRoom::findMessage (const string &messageId) {
|
||||
L_D();
|
||||
shared_ptr<ChatMessage> cm = nullptr;
|
||||
|
|
|
|||
|
|
@ -66,7 +66,6 @@ public:
|
|||
std::shared_ptr<ChatMessage> createMessage (const std::string &msg);
|
||||
std::shared_ptr<ChatMessage> createMessage ();
|
||||
void deleteHistory ();
|
||||
void deleteMessage (const std::shared_ptr<ChatMessage> &msg);
|
||||
std::shared_ptr<ChatMessage> findMessage (const std::string &messageId);
|
||||
std::shared_ptr<ChatMessage> findMessageWithDirection (const std::string &messageId, ChatMessage::Direction direction);
|
||||
std::list<std::shared_ptr<ChatMessage>> getHistory (int nbMessages);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue