From 0c5a69cce4b47ea217e4f9c9b0244615b1641df3 Mon Sep 17 00:00:00 2001 From: lilia Date: Wed, 24 May 2017 13:17:20 -0700 Subject: [PATCH] Add support for getProfile to TextSecureServer // FREEBIE --- js/libtextsecure.js | 10 +++++++++- libtextsecure/api.js | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/js/libtextsecure.js b/js/libtextsecure.js index 512d2ae86e..0cbce54921 100644 --- a/js/libtextsecure.js +++ b/js/libtextsecure.js @@ -37628,7 +37628,8 @@ var TextSecureServer = (function() { keys : "v2/keys", signed : "v2/keys/signed", messages : "v1/messages", - attachment : "v1/attachments" + attachment : "v1/attachments", + profile : "v1/profile" }; function TextSecureServer(url, ports, username, password) { @@ -37696,6 +37697,13 @@ var TextSecureServer = (function() { throw e; }); }, + getProfile: function(number) { + return this.ajax({ + call : 'profile', + httpType : 'GET', + urlParameters : '/' + number, + }); + }, requestVerificationSMS: function(number) { return this.ajax({ call : 'accounts', diff --git a/libtextsecure/api.js b/libtextsecure/api.js index 046492445c..1803bb30ab 100644 --- a/libtextsecure/api.js +++ b/libtextsecure/api.js @@ -136,7 +136,8 @@ var TextSecureServer = (function() { keys : "v2/keys", signed : "v2/keys/signed", messages : "v1/messages", - attachment : "v1/attachments" + attachment : "v1/attachments", + profile : "v1/profile" }; function TextSecureServer(url, ports, username, password) { @@ -204,6 +205,13 @@ var TextSecureServer = (function() { throw e; }); }, + getProfile: function(number) { + return this.ajax({ + call : 'profile', + httpType : 'GET', + urlParameters : '/' + number, + }); + }, requestVerificationSMS: function(number) { return this.ajax({ call : 'accounts',