Commit 43e42a55 authored by Guillaume BIENKOWSKI's avatar Guillaume BIENKOWSKI
Browse files

Better fix: just in case, don't use the storage id and use a better search condition.

parent 76a5f51e
...@@ -156,7 +156,8 @@ unsigned int linphone_chat_message_store(LinphoneChatMessage *msg){ ...@@ -156,7 +156,8 @@ unsigned int linphone_chat_message_store(LinphoneChatMessage *msg){
void linphone_chat_message_store_state(LinphoneChatMessage *msg){ void linphone_chat_message_store_state(LinphoneChatMessage *msg){
LinphoneCore *lc=msg->chat_room->lc; LinphoneCore *lc=msg->chat_room->lc;
if (lc->db){ if (lc->db){
char *buf=sqlite3_mprintf("UPDATE history SET status=%i WHERE id = %i;",msg->state,msg->storage_id); char *buf=sqlite3_mprintf("UPDATE history SET status=%i WHERE (message = %Q OR url = %Q) AND utc = %i;",
linphone_sql_request(lc->db,buf); linphone_sql_request(lc->db,buf);
sqlite3_free(buf); sqlite3_free(buf);
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment