]> sjero.net Git - linphone/blobdiff - coreapi/callbacks.c
clean message storage API
[linphone] / coreapi / callbacks.c
index d65e536740a884fe216f7db3d425e73bc3534b31..dd5ab7edc5a80809b079758eab884720e1caa0c5 100644 (file)
@@ -934,10 +934,11 @@ static void text_delivery_update(SalOp *op, SalTextDeliveryStatus status){
        LinphoneChatMessage *chat_msg=(LinphoneChatMessage* )sal_op_get_user_pointer(op);
        const MSList* calls = linphone_core_get_calls(chat_msg->chat_room->lc);
        
-       linphone_core_set_message_state(chat_msg->chat_room,chat_msg->message,chatStatusSal2Linphone(status),chat_msg->time);   
+       chat_msg->state=chatStatusSal2Linphone(status);
+       linphone_chat_message_store_state(chat_msg);
        if (chat_msg && chat_msg->cb) {
                chat_msg->cb(chat_msg
-                       ,chatStatusSal2Linphone(status)
+                       ,chat_msg->state
                        ,chat_msg->cb_ud);
        }
        linphone_chat_message_destroy(chat_msg);