For some reason messageId count for send messages is reset every relaunch. Currently objcTox assumes that it won't be reset. Because of that we update wrong message with delivered status.
From tox.h file:
/**
* The return value of this function is the message ID. If a read receipt is
* received, the triggered `friend_read_receipt` event will be passed this message ID.
*
* Message IDs are unique per friend. The first message ID is 0. Message IDs are
* incremented by 1 each time a message is sent. If UINT32_MAX messages were
* sent, the next message ID is 0.
*/
uint32_t tox_friend_send_message
For some reason messageId count for send messages is reset every relaunch. Currently objcTox assumes that it won't be reset. Because of that we update wrong message with delivered status.
From tox.h file: