From b0264b3e0034ddd9ea76d0e13bb4c3c709ba3b3e Mon Sep 17 00:00:00 2001 From: fiaxh Date: Sat, 12 Aug 2017 23:27:20 +0200 Subject: xmpp-vala: Remove require-functions --- xmpp-vala/src/module/roster/module.vala | 6 ------ xmpp-vala/src/module/roster/versioning_module.vala | 3 +-- 2 files changed, 1 insertion(+), 8 deletions(-) (limited to 'xmpp-vala/src/module/roster') diff --git a/xmpp-vala/src/module/roster/module.vala b/xmpp-vala/src/module/roster/module.vala index 4c1028fb..85693686 100644 --- a/xmpp-vala/src/module/roster/module.vala +++ b/xmpp-vala/src/module/roster/module.vala @@ -65,14 +65,8 @@ public class Module : XmppStreamModule, Iq.Handler { public void on_iq_get(XmppStream stream, Iq.Stanza iq) { } - public static void require(XmppStream stream) { - if (stream.get_module(IDENTITY) == null) stream.add_module(new Module()); - } - public override void attach(XmppStream stream) { - Iq.Module.require(stream); stream.get_module(Iq.Module.IDENTITY).register_for_namespace(NS_URI, this); - Presence.Module.require(stream); stream.get_module(Presence.Module.IDENTITY).initial_presence_sent.connect(roster_get); stream.add_flag(new Flag()); } diff --git a/xmpp-vala/src/module/roster/versioning_module.vala b/xmpp-vala/src/module/roster/versioning_module.vala index fbdb6cef..ce87ec2a 100644 --- a/xmpp-vala/src/module/roster/versioning_module.vala +++ b/xmpp-vala/src/module/roster/versioning_module.vala @@ -16,7 +16,6 @@ public class VersioningModule : XmppStreamModule { } public override void attach(XmppStream stream) { - Module.require(stream); stream.get_module(Module.IDENTITY).pre_get_roster.connect(on_pre_get_roster); stream.get_module(Module.IDENTITY).received_roster.connect(on_received_roster); stream.get_module(Module.IDENTITY).item_updated.connect(on_item_updated); @@ -72,4 +71,4 @@ public interface Storage : Object { public abstract void remove_item(Roster.Item item); } -} \ No newline at end of file +} -- cgit v1.2.3-70-g09d2