diff options
| author | Marvin W <git@larma.de> | 2026-05-30 16:10:36 +0200 |
|---|---|---|
| committer | Marvin W <git@larma.de> | 2026-06-07 23:13:07 +0200 |
| commit | 158cff3098e9370696f9250a199c78e4f2d18ce0 (patch) | |
| tree | bd05a55e5419ef2307c7a7f4d7665f7449c8e8b1 /libdino/src/entity/account.vala | |
| parent | afcf44928748f7ac049f1ba9f5c51c6dedbf4ec2 (diff) | |
Add JID interning
Diffstat (limited to 'libdino/src/entity/account.vala')
| -rw-r--r-- | libdino/src/entity/account.vala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libdino/src/entity/account.vala b/libdino/src/entity/account.vala index e7729fa0..a108af22 100644 --- a/libdino/src/entity/account.vala +++ b/libdino/src/entity/account.vala @@ -10,7 +10,7 @@ public class Account : Object { public string domainpart { get { return full_jid.domainpart; } } public string resourcepart { get { return full_jid.resourcepart; } - private set { full_jid.resourcepart = value; } + private set { full_jid = full_jid.with_resource(value); } } public Jid bare_jid { owned get { return full_jid.bare_jid; } } public Jid full_jid { get; private set; } @@ -37,7 +37,7 @@ public class Account : Object { public Account.from_row(Database db, Qlite.Row row) throws InvalidJidError { this.db = db; id = row[db.account.id]; - full_jid = new Jid(row[db.account.bare_jid]).with_resource(row[db.account.resourcepart]); + full_jid = Jid.from_string(row[db.account.bare_jid]).with_resource(row[db.account.resourcepart]); password = row[db.account.password]; alias = row[db.account.alias]; enabled = row[db.account.enabled]; @@ -82,7 +82,7 @@ public class Account : Object { } public static bool equals_func(Account acc1, Account acc2) { - return acc1.bare_jid.to_string() == acc2.bare_jid.to_string(); + return acc1.bare_jid.equals(acc2.bare_jid); } public static uint hash_func(Account acc) { |
