some changes
This commit is contained in:
parent
82e4e40af5
commit
46c678a3e2
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue