Geary.ImapDB: Use RFC822 strings for Message-Id values in the database
Ensure `RFC822.MessageID.to_rfc822_string` is used when storing and searching for message ids in the database.
This commit is contained in:
parent
fe61902367
commit
d280bcbbeb
2 changed files with 3 additions and 3 deletions
|
|
@ -494,8 +494,8 @@ private class Geary.ImapDB.Account : BaseObject {
|
|||
|
||||
yield db.exec_transaction_async(Db.TransactionType.RO, (cx) => {
|
||||
Db.Statement stmt = cx.prepare("SELECT id FROM MessageTable WHERE message_id = ? OR in_reply_to = ?");
|
||||
stmt.bind_string(0, message_id.value);
|
||||
stmt.bind_string(1, message_id.value);
|
||||
stmt.bind_string(0, message_id.to_rfc822_string());
|
||||
stmt.bind_string(1, message_id.to_rfc822_string());
|
||||
|
||||
Db.Result result = stmt.exec(cancellable);
|
||||
while (!result.finished) {
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ private class Geary.ImapDB.MessageRow {
|
|||
}
|
||||
|
||||
if (email.fields.is_all_set(Geary.Email.Field.REFERENCES)) {
|
||||
message_id = (email.message_id != null) ? email.message_id.value : null;
|
||||
message_id = (email.message_id != null) ? email.message_id.to_rfc822_string() : null;
|
||||
in_reply_to = (email.in_reply_to != null) ? email.in_reply_to.to_rfc822_string() : null;
|
||||
references = (email.references != null) ? email.references.to_rfc822_string() : null;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue