aboutsummaryrefslogtreecommitdiff
path: root/libdino/src
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2020-01-08 18:15:42 +0100
committerfiaxh <git@lightrise.org>2020-01-08 19:29:22 +0100
commitb1bbb9f5872fc89cd8fa402bc5b8127dc7dea45b (patch)
tree0ae6e7a77923d0deb742550a875c7a5d53622a0f /libdino/src
parent067184f00c5b5b57b31a73af7fe6276ff9091123 (diff)
downloaddino-b1bbb9f5872fc89cd8fa402bc5b8127dc7dea45b.tar.gz
dino-b1bbb9f5872fc89cd8fa402bc5b8127dc7dea45b.zip
Fix auto-joining bookmark without nick
Diffstat (limited to 'libdino/src')
-rw-r--r--libdino/src/service/muc_manager.vala4
-rw-r--r--libdino/src/service/registration.vala2
2 files changed, 3 insertions, 3 deletions
diff --git a/libdino/src/service/muc_manager.vala b/libdino/src/service/muc_manager.vala
index a51204c3..62d089e7 100644
--- a/libdino/src/service/muc_manager.vala
+++ b/libdino/src/service/muc_manager.vala
@@ -38,7 +38,7 @@ public class MucManager : StreamInteractionModule, Object {
public async Muc.JoinResult? join(Account account, Jid jid, string? nick, string? password) {
XmppStream? stream = stream_interactor.get_stream(account);
if (stream == null) return null;
- string nick_ = nick ?? account.bare_jid.localpart ?? account.bare_jid.domainpart;
+ string nick_ = (nick ?? account.localpart) ?? account.domainpart;
DateTime? history_since = null;
Conversation? conversation = stream_interactor.get_module(ConversationManager.IDENTITY).get_conversation(jid, account);
@@ -372,7 +372,6 @@ public class MucManager : StreamInteractionModule, Object {
Set<Conference>? conferences = bookmarks_provider[account].get_conferences.end(res);
if (conferences == null) return;
- Conference changed = new Xep.Bookmarks.Bookmarks1Conference(jid) { nick=nick, password=password, autojoin=true };
foreach (Conference conference in conferences) {
if (conference.jid.equals(jid)) {
if (!conference.autojoin) {
@@ -386,6 +385,7 @@ public class MucManager : StreamInteractionModule, Object {
return;
}
}
+ Conference changed = new Xep.Bookmarks.Bookmarks1Conference(jid) { nick=nick, password=password, autojoin=true };
bookmarks_provider[account].add_conference.begin(stream, changed);
});
}
diff --git a/libdino/src/service/registration.vala b/libdino/src/service/registration.vala
index 073d2b74..070ae12d 100644
--- a/libdino/src/service/registration.vala
+++ b/libdino/src/service/registration.vala
@@ -47,7 +47,7 @@ public class Register : StreamInteractionModule, Object{
ret = ConnectionManager.ConnectionError.Source.SASL;
Idle.add((owned)callback);
});
- stream.connect.begin(account.bare_jid.domainpart, (_, res) => {
+ stream.connect.begin(account.domainpart, (_, res) => {
try {
stream.connect.end(res);
} catch (Error e) {