telepathyClient.js: use ShellTpClient instead of TpSimpleObserver
https://bugzilla.gnome.org/show_bug.cgi?id=645585
This commit is contained in:
parent
145bf19636
commit
2028f33e38
@ -80,15 +80,10 @@ Client.prototype = {
|
||||
// The second argument, recover, means _observeChannels will be run
|
||||
// for any existing channel as well.
|
||||
let dbus = Tp.DBusDaemon.dup();
|
||||
this._observer = Tp.SimpleObserver.new(dbus, true, 'GnomeShell', true,
|
||||
this._observer = Shell.TpClient.new(dbus);
|
||||
this._observer.set_observe_channels_func(
|
||||
Lang.bind(this, this._observeChannels));
|
||||
|
||||
// We only care about single-user text-based chats
|
||||
let props = {};
|
||||
props[Tp.PROP_CHANNEL_CHANNEL_TYPE] = Tp.IFACE_CHANNEL_TYPE_TEXT;
|
||||
props[Tp.PROP_CHANNEL_TARGET_HANDLE_TYPE] = Tp.HandleType.CONTACT;
|
||||
this._observer.add_observer_filter(props);
|
||||
|
||||
try {
|
||||
this._observer.register();
|
||||
} catch (e) {
|
||||
|
Loading…
Reference in New Issue
Block a user