aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service
diff options
context:
space:
mode:
Diffstat (limited to 'libdino/src/service')
-rw-r--r--libdino/src/service/muc_manager.vala4
-rw-r--r--libdino/src/service/notification_events.vala4
2 files changed, 7 insertions, 1 deletions
diff --git a/libdino/src/service/muc_manager.vala b/libdino/src/service/muc_manager.vala
index 21d11f5d..392339c1 100644
--- a/libdino/src/service/muc_manager.vala
+++ b/libdino/src/service/muc_manager.vala
@@ -15,6 +15,7 @@ public class MucManager : StreamInteractionModule, Object {
public signal void room_name_set(Account account, Jid jid, string? room_name);
public signal void private_room_occupant_updated(Account account, Jid room, Jid occupant);
public signal void bookmarks_updated(Account account, Gee.List<Xep.Bookmarks.Conference> conferences);
+ public signal void invite_received(Account account, Jid room_jid, Jid from_jid, string? password, string? reason);
private StreamInteractor stream_interactor;
private HashMap<Jid, Xep.Muc.MucEnterError> enter_errors = new HashMap<Jid, Xep.Muc.MucEnterError>(Jid.hash_func, Jid.equals_func);
@@ -264,6 +265,9 @@ public class MucManager : StreamInteractionModule, Object {
stream_interactor.module_manager.get_module(account, Xep.Muc.Module.IDENTITY).subject_set.connect( (stream, subject, jid) => {
subject_set(account, jid, subject);
});
+ stream_interactor.module_manager.get_module(account, Xep.Muc.Module.IDENTITY).invite_received.connect( (stream, room_jid, from_jid, password, reason) => {
+ invite_received(account, room_jid, from_jid, password, reason);
+ });
stream_interactor.module_manager.get_module(account, Xep.Muc.Module.IDENTITY).room_name_set.connect( (stream, jid, room_name) => {
room_name_set(account, jid, room_name);
});
diff --git a/libdino/src/service/notification_events.vala b/libdino/src/service/notification_events.vala
index 1beeb4ed..f47b9a0a 100644
--- a/libdino/src/service/notification_events.vala
+++ b/libdino/src/service/notification_events.vala
@@ -12,6 +12,7 @@ public class NotificationEvents : StreamInteractionModule, Object {
public signal void notify_content_item(ContentItem content_item, Conversation conversation);
public signal void notify_subscription_request(Conversation conversation);
public signal void notify_connection_error(Account account, ConnectionManager.ConnectionError error);
+ public signal void notify_muc_invite(Account account, Jid room_jid, Jid from_jid, string? password, string? reason);
private StreamInteractor stream_interactor;
@@ -28,6 +29,8 @@ public class NotificationEvents : StreamInteractionModule, Object {
stream_interactor.get_module(ContentItemStore.IDENTITY).new_item.connect(on_content_item_received);
stream_interactor.get_module(PresenceManager.IDENTITY).received_subscription_request.connect(on_received_subscription_request);
+ stream_interactor.get_module(MucManager.IDENTITY).invite_received.connect((account, room_jid, from_jid, password, reason) => notify_muc_invite(account, room_jid, from_jid, password, reason));
+ stream_interactor.connection_manager.connection_error.connect((account, error) => notify_connection_error(account, error));
stream_interactor.get_module(MessageProcessor.IDENTITY).history_synced.connect((account) => {
synced_accounts.add(account);
if (!mam_potential_new.has_key(account)) return;
@@ -40,7 +43,6 @@ public class NotificationEvents : StreamInteractionModule, Object {
}
mam_potential_new[account].clear();
});
- stream_interactor.connection_manager.connection_error.connect((account, error) => notify_connection_error(account, error));
}
private void on_content_item_received(ContentItem item, Conversation conversation) {