mirror of
https://github.com/chatmail/core.git
synced 2026-05-09 01:46:30 +03:00
fix: update passed by reference Message in prepare_msg_raw()
This commit is contained in:
21
src/chat.rs
21
src/chat.rs
@@ -1713,6 +1713,11 @@ impl Chat {
|
|||||||
None
|
None
|
||||||
};
|
};
|
||||||
|
|
||||||
|
msg.chat_id = self.id;
|
||||||
|
msg.from_id = ContactId::SELF;
|
||||||
|
msg.rfc724_mid = new_rfc724_mid;
|
||||||
|
msg.timestamp_sort = timestamp;
|
||||||
|
|
||||||
// add message to the database
|
// add message to the database
|
||||||
if let Some(update_msg_id) = update_msg_id {
|
if let Some(update_msg_id) = update_msg_id {
|
||||||
context
|
context
|
||||||
@@ -1726,11 +1731,11 @@ impl Chat {
|
|||||||
ephemeral_timestamp=?
|
ephemeral_timestamp=?
|
||||||
WHERE id=?;",
|
WHERE id=?;",
|
||||||
params_slice![
|
params_slice![
|
||||||
new_rfc724_mid,
|
msg.rfc724_mid,
|
||||||
self.id,
|
msg.chat_id,
|
||||||
ContactId::SELF,
|
msg.from_id,
|
||||||
to_id,
|
to_id,
|
||||||
timestamp,
|
msg.timestamp_sort,
|
||||||
msg.viewtype,
|
msg.viewtype,
|
||||||
msg.state,
|
msg.state,
|
||||||
msg.text,
|
msg.text,
|
||||||
@@ -1775,11 +1780,11 @@ impl Chat {
|
|||||||
ephemeral_timestamp)
|
ephemeral_timestamp)
|
||||||
VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,1,?,?,?);",
|
VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,1,?,?,?);",
|
||||||
params_slice![
|
params_slice![
|
||||||
new_rfc724_mid,
|
msg.rfc724_mid,
|
||||||
self.id,
|
msg.chat_id,
|
||||||
ContactId::SELF,
|
msg.from_id,
|
||||||
to_id,
|
to_id,
|
||||||
timestamp,
|
msg.timestamp_sort,
|
||||||
msg.viewtype,
|
msg.viewtype,
|
||||||
msg.state,
|
msg.state,
|
||||||
msg.text,
|
msg.text,
|
||||||
|
|||||||
Reference in New Issue
Block a user