mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Implement deleting a toxme address
This commit is contained in:
parent
1883b4e25e
commit
ae877ccd6d
@ -125,3 +125,13 @@ bool Toxme::createAddress(ToxID id, QString address,
|
|||||||
|
|
||||||
return (extractError(response) == 0);
|
return (extractError(response) == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Toxme::deleteAddress(ToxID id)
|
||||||
|
{
|
||||||
|
const QString payload{"{\"public_key\":\""+id.toString().left(64)+"\","
|
||||||
|
"\"timestamp\":"+QString().setNum(time(0))+"}"};
|
||||||
|
|
||||||
|
QByteArray response = makeJsonRequest(prepareEncryptedJson(2,payload));
|
||||||
|
|
||||||
|
return (extractError(response) == 0);
|
||||||
|
}
|
||||||
|
@ -21,6 +21,8 @@ public:
|
|||||||
/// The bio is a short optional description of yourself if you want to publish your address.
|
/// The bio is a short optional description of yourself if you want to publish your address.
|
||||||
static bool createAddress(ToxID id, QString address,
|
static bool createAddress(ToxID id, QString address,
|
||||||
bool keepPrivate=true, QString bio=QString());
|
bool keepPrivate=true, QString bio=QString());
|
||||||
|
/// Deletes the address associated with your current Tox ID
|
||||||
|
static bool deleteAddress(ToxID id);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Toxme()=delete;
|
Toxme()=delete;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user