aboutsummaryrefslogtreecommitdiff
path: root/client/src
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-03-08 11:43:20 +0100
committerfiaxh <git@mx.ax.lt>2017-03-08 11:43:20 +0100
commit811e252de19c2a8735c24b05c7ebae9328168096 (patch)
tree77a1e4307c8e74c1aab8d14ad45d110257af5ce0 /client/src
parenta9ae79878e5289d198af47fc4e9e2149450b2502 (diff)
downloaddino-811e252de19c2a8735c24b05c7ebae9328168096.tar.gz
dino-811e252de19c2a8735c24b05c7ebae9328168096.zip
Properly handle JIDs without localpart; fixes #1
Diffstat (limited to 'client/src')
-rw-r--r--client/src/entity/jid.vala4
1 files changed, 1 insertions, 3 deletions
diff --git a/client/src/entity/jid.vala b/client/src/entity/jid.vala
index aab31b98..f1da0c00 100644
--- a/client/src/entity/jid.vala
+++ b/client/src/entity/jid.vala
@@ -4,7 +4,7 @@ public class Dino.Entities.Jid : Object {
public string? resourcepart { get; set; }
public Jid? bare_jid {
- owned get { return new Jid(@"$localpart@$domainpart"); }
+ owned get { return localpart != null ? new Jid(@"$localpart@$domainpart") : new Jid(domainpart); }
}
private string jid { get; private set; }
@@ -19,8 +19,6 @@ public class Dino.Entities.Jid : Object {
public Jid.with_resource(string bare_jid, string resource) {
Jid? parsed = Jid.parse(bare_jid);
- print(parsed.localpart + "\n");
- print(parsed.domainpart + "\n");
Jid.components(parsed.localpart, parsed.domainpart, resourcepart);
}