some changes

This commit is contained in:
Thomas 2020-07-24 19:57:40 +02:00
parent 82e4e40af5
commit 46c678a3e2
1 changed files with 3 additions and 3 deletions

View File

@ -65,15 +65,15 @@ public class UpdateAccountInfoAsyncTask extends AsyncTask<Void, Void, Void> {
}
if (social == SOCIAL.MASTODON || social == SOCIAL.PIXELFED || social == SOCIAL.PLEROMA) {
account = new API(this.contextReference.get(), instance, null).verifyCredentials();
InstanceNodeInfo info = new API(this.contextReference.get(), instance, null).displayNodeInfo(this.instance);
InstanceNodeInfo info = new API(this.contextReference.get(), instance, token).displayNodeInfo(this.instance);
if (info != null && info.getName() != null && account != null)
account.setSocial(info.getName().toUpperCase());
} else if (social == SOCIAL.PEERTUBE) {
account = new PeertubeAPI(this.contextReference.get(), instance, null).verifyCredentials();
account = new PeertubeAPI(this.contextReference.get(), instance, token).verifyCredentials();
if (account != null)
account.setSocial("PEERTUBE");
} else {
account = new GNUAPI(this.contextReference.get(), instance, null).verifyCredentials();
account = new GNUAPI(this.contextReference.get(), instance, token).verifyCredentials();
}
if (account == null)
return null;