[polari/wip/carlosg/tracker: 441/445] telepathyClient: Use update_resource() SPARQL connection API
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/wip/carlosg/tracker: 441/445] telepathyClient: Use update_resource() SPARQL connection API
- Date: Mon, 21 Jun 2021 22:04:11 +0000 (UTC)
commit 1c5e7a02a229e4aa7fdd278bd1dfcb8a94ddc9eb
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Jun 19 12:18:30 2021 +0200
telepathyClient: Use update_resource() SPARQL connection API
This avoids SPARQL parsing altogether, which performs better.
src/telepathyClient.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/telepathyClient.js b/src/telepathyClient.js
index 97809658..e1948bd7 100644
--- a/src/telepathyClient.js
+++ b/src/telepathyClient.js
@@ -703,10 +703,10 @@ class TelepathyClient extends Tp.BaseClient {
let channelName = channel.identifier;
let message = Polari.Message.new_from_tp_message (tpMessage);
- let sparql = message.to_sparql(connection, accountId, channelName, isRoom);
- connection.update_async(sparql, null, (o, res) => {
+ let res = message.to_tracker_resource(accountId, channelName, isRoom);
+ connection.update_resource_async(null, resource, null, (o, res) => {
try {
- connection.update_finish(res);
+ connection.update_resource_finish(res);
} catch (e) {
log(`Failed to log message: ${e.message}`);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]