Update Geary.Outbox.EmailIdentifier variant type marker
Use 'o' instead of 's' to avoid confusion with search ids. Add test.
This commit is contained in:
parent
bf4f5c4780
commit
94e0736cfd
3 changed files with 5 additions and 2 deletions
|
|
@ -416,7 +416,7 @@ private abstract class Geary.ImapEngine.GenericAccount : Geary.Account {
|
|||
char type = (char) serialised.get_child_value(0).get_byte();
|
||||
if (type == 'i')
|
||||
return new ImapDB.EmailIdentifier.from_variant(serialised);
|
||||
if (type == 's')
|
||||
if (type == 'o')
|
||||
return new Outbox.EmailIdentifier.from_variant(serialised);
|
||||
|
||||
throw new EngineError.BAD_PARAMETERS("Unknown serialised type: %c", type);
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ private class Geary.Outbox.EmailIdentifier : Geary.EmailIdentifier {
|
|||
// Return a tuple to satisfy the API contract, add an 's' to
|
||||
// inform GenericAccount that it's an SMTP id.
|
||||
return new GLib.Variant.tuple(new Variant[] {
|
||||
new GLib.Variant.byte('s'),
|
||||
new GLib.Variant.byte('o'),
|
||||
new GLib.Variant.int64(this.message_id),
|
||||
new GLib.Variant.int64(this.ordering)
|
||||
});
|
||||
|
|
|
|||
|
|
@ -88,6 +88,9 @@ public class Geary.ImapEngine.GenericAccountTest : TestCase {
|
|||
assert_non_null(
|
||||
test_article.to_email_identifier(new GLib.Variant("(yxx)", 'i', 1, 2))
|
||||
);
|
||||
assert_non_null(
|
||||
test_article.to_email_identifier(new GLib.Variant("(yxx)", 'o', 1, 2))
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue