diff options
author | fiaxh <git@lightrise.org> | 2019-03-15 20:56:19 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2019-03-15 22:01:34 +0100 |
commit | 6f6e4b97cba49469440fc0aefafb71623a3eabb9 (patch) | |
tree | e5a11627d5d34a9eac9ad50ee0822a05fe7b91bf /plugins/omemo/src/stream_module.vala | |
parent | a49326979140750cc22cf483182274638568e43d (diff) | |
download | dino-6f6e4b97cba49469440fc0aefafb71623a3eabb9.tar.gz dino-6f6e4b97cba49469440fc0aefafb71623a3eabb9.zip |
Use glib log functions
Diffstat (limited to 'plugins/omemo/src/stream_module.vala')
-rw-r--r-- | plugins/omemo/src/stream_module.vala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/omemo/src/stream_module.vala b/plugins/omemo/src/stream_module.vala index 6ee42771..30f8c04c 100644 --- a/plugins/omemo/src/stream_module.vala +++ b/plugins/omemo/src/stream_module.vala @@ -38,7 +38,7 @@ public class StreamModule : XmppStreamModule { public void request_user_devicelist(XmppStream stream, Jid jid) { if (active_devicelist_requests.add(jid)) { - if (Plugin.DEBUG) print(@"OMEMO: requesting device list for $jid\n"); + debug("requesting device list for %s", jid.to_string()); stream.get_module(Pubsub.Module.IDENTITY).request(stream, jid, NODE_DEVICELIST, (stream, jid, id, node) => on_devicelist(stream, jid, id, node)); } } @@ -56,7 +56,7 @@ public class StreamModule : XmppStreamModule { } } if (!am_on_devicelist) { - if (Plugin.DEBUG) print(@"OMEMO: Not on device list, adding id\n"); + debug(@"Not on device list, adding id"); node.put_node(new StanzaNode.build("device", NS_URI).put_attribute("id", store.local_registration_id.to_string())); stream.get_module(Pubsub.Module.IDENTITY).publish(stream, jid, NODE_DEVICELIST, NODE_DEVICELIST, id, node); } @@ -90,7 +90,7 @@ public class StreamModule : XmppStreamModule { public void fetch_bundle(XmppStream stream, Jid jid, int device_id) { if (active_bundle_requests.add(jid.bare_jid.to_string() + @":$device_id")) { - if (Plugin.DEBUG) print(@"OMEMO: Asking for bundle from $(jid.bare_jid.to_string()):$device_id\n"); + debug(@"Asking for bundle from %s: %i", jid.bare_jid.to_string(), device_id); stream.get_module(Pubsub.Module.IDENTITY).request(stream, jid.bare_jid, @"$NODE_BUNDLES:$device_id", (stream, jid, id, node) => { on_other_bundle_result(stream, jid, device_id, id, node); }); @@ -233,7 +233,7 @@ public class StreamModule : XmppStreamModule { publish_bundles(stream, (!)signed_pre_key_record, identity_key_pair, pre_key_records, (int32) store.local_registration_id); } } catch (Error e) { - if (Plugin.DEBUG) print(@"Unexpected error while publishing bundle: $(e.message)\n"); + warning(@"Unexpected error while publishing bundle: $(e.message)\n"); } stream.get_module(IDENTITY).active_bundle_requests.remove(jid.bare_jid.to_string() + @":$(store.local_registration_id)"); } |