mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-27 19:22:15 -05:00
fixed #75
This commit is contained in:
parent
6942840061
commit
a55ddb889e
@ -118,11 +118,12 @@ public class PgpEngine {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public String generateSignature(String status)
|
||||
public String generateSignature(Account account, String status)
|
||||
throws UserInputRequiredException {
|
||||
Intent params = new Intent();
|
||||
params.putExtra(OpenPgpApi.EXTRA_REQUEST_ASCII_ARMOR, true);
|
||||
params.setAction(OpenPgpApi.ACTION_SIGN);
|
||||
params.putExtra(OpenPgpApi.EXTRA_ACCOUNT_NAME, account.getJid());
|
||||
InputStream is = new ByteArrayInputStream(status.getBytes());
|
||||
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
||||
Intent result = api.executeApi(params, is, os);
|
||||
|
@ -1311,7 +1311,7 @@ public class XmppConnectionService extends Service {
|
||||
public void generatePgpAnnouncement(Account account)
|
||||
throws PgpEngine.UserInputRequiredException {
|
||||
if (account.getStatus() == Account.STATUS_ONLINE) {
|
||||
String signature = getPgpEngine().generateSignature("online");
|
||||
String signature = getPgpEngine().generateSignature(account,"online");
|
||||
account.setKey("pgp_signature", signature);
|
||||
databaseBackend.updateAccount(account);
|
||||
sendPgpPresence(account, signature);
|
||||
|
Loading…
Reference in New Issue
Block a user