Support for server endpoint to set signed key
This commit is contained in:
parent
54536360ff
commit
37ad742ccf
2 changed files with 24 additions and 0 deletions
|
@ -37619,6 +37619,7 @@ var TextSecureServer = (function() {
|
||||||
accounts : "v1/accounts",
|
accounts : "v1/accounts",
|
||||||
devices : "v1/devices",
|
devices : "v1/devices",
|
||||||
keys : "v2/keys",
|
keys : "v2/keys",
|
||||||
|
signed : "v2/keys/signed",
|
||||||
messages : "v1/messages",
|
messages : "v1/messages",
|
||||||
attachment : "v1/attachments"
|
attachment : "v1/attachments"
|
||||||
};
|
};
|
||||||
|
@ -37776,6 +37777,17 @@ var TextSecureServer = (function() {
|
||||||
jsonData : keys,
|
jsonData : keys,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
setSignedPreKey: function(signedPreKey) {
|
||||||
|
return this.ajax({
|
||||||
|
call : 'signed',
|
||||||
|
httpType : 'PUT',
|
||||||
|
jsonData : {
|
||||||
|
keyId: signedPreKey.keyId,
|
||||||
|
publicKey: btoa(getString(signedPreKey.publicKey)),
|
||||||
|
signature: btoa(getString(signedPreKey.signature))
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
getMyKeys: function(number, deviceId) {
|
getMyKeys: function(number, deviceId) {
|
||||||
return this.ajax({
|
return this.ajax({
|
||||||
call : 'keys',
|
call : 'keys',
|
||||||
|
|
|
@ -134,6 +134,7 @@ var TextSecureServer = (function() {
|
||||||
accounts : "v1/accounts",
|
accounts : "v1/accounts",
|
||||||
devices : "v1/devices",
|
devices : "v1/devices",
|
||||||
keys : "v2/keys",
|
keys : "v2/keys",
|
||||||
|
signed : "v2/keys/signed",
|
||||||
messages : "v1/messages",
|
messages : "v1/messages",
|
||||||
attachment : "v1/attachments"
|
attachment : "v1/attachments"
|
||||||
};
|
};
|
||||||
|
@ -291,6 +292,17 @@ var TextSecureServer = (function() {
|
||||||
jsonData : keys,
|
jsonData : keys,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
setSignedPreKey: function(signedPreKey) {
|
||||||
|
return this.ajax({
|
||||||
|
call : 'signed',
|
||||||
|
httpType : 'PUT',
|
||||||
|
jsonData : {
|
||||||
|
keyId: signedPreKey.keyId,
|
||||||
|
publicKey: btoa(getString(signedPreKey.publicKey)),
|
||||||
|
signature: btoa(getString(signedPreKey.signature))
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
getMyKeys: function(number, deviceId) {
|
getMyKeys: function(number, deviceId) {
|
||||||
return this.ajax({
|
return this.ajax({
|
||||||
call : 'keys',
|
call : 'keys',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue