diff options
author | fiaxh <git@lightrise.org> | 2019-12-24 03:14:11 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2019-12-24 03:14:11 +0100 |
commit | 33499d076ddfdcdc62e3bd98b30105e4efc817d5 (patch) | |
tree | c8f0029dfb7a918353b74b747c7bebd7e815ed17 /libdino/src | |
parent | f58119f25e42da7a21e2c4324b305cc8c5fb6760 (diff) | |
download | dino-33499d076ddfdcdc62e3bd98b30105e4efc817d5.tar.gz dino-33499d076ddfdcdc62e3bd98b30105e4efc817d5.zip |
Only cache fully normalized Jids for reverse lookup
Diffstat (limited to 'libdino/src')
-rw-r--r-- | libdino/src/service/database.vala | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libdino/src/service/database.vala b/libdino/src/service/database.vala index 792b4b5f..8b32c107 100644 --- a/libdino/src/service/database.vala +++ b/libdino/src/service/database.vala @@ -502,7 +502,11 @@ public class Database : Qlite.Database { if (bare_jid != null) { Jid jid_parsed = new Jid(bare_jid); jid_table_cache[id] = jid_parsed; - jid_table_reverse[jid_parsed] = id; + + // Only store fully normalized Jids for reverse lookup + if (jid_parsed.to_string() == bare_jid) { + jid_table_reverse[jid_parsed] = id; + } return jid_parsed; } return null; |