[polari] chatroomManager: Use new 'join-room' action



commit 33c6db7753b20ba16087650786a1679456595069
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Aug 2 03:37:00 2013 +0200

    chatroomManager: Use new 'join-room' action

 src/chatroomManager.js |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/src/chatroomManager.js b/src/chatroomManager.js
index 27014bf..06d91e0 100644
--- a/src/chatroomManager.js
+++ b/src/chatroomManager.js
@@ -118,14 +118,12 @@ const _ChatroomManager = new Lang.Class({
     },
 
     _restoreChannel: function(serializedChannel) {
-        let factory = this._accountManager.get_factory();
-        let account = factory.ensure_account(serializedChannel.account, []);
-
-        let req = Tp.AccountChannelRequest.new_text(account, 0);
-        req.set_target_id(Tp.HandleType.ROOM, serializedChannel.channel);
-        req.set_delegate_to_preferred_handler(true);
-        let preferredHandler = Tp.CLIENT_BUS_NAME_BASE + 'Polari';
-        req.ensure_channel_async(preferredHandler, null, null);
+        let action = this._app.lookup_action('join-room');
+        let parameter = GLib.Variant.new('(ssu)',
+                                        [serializedChannel.account,
+                                         serializedChannel.channel,
+                                         0]);
+        action.activate(parameter);
     },
 
     _ensureRoomForChannel: function(channel) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]