summaryrefslogtreecommitdiffstats
path: root/app/src/main/java/fr/gouv/etalab/mastodon/asynctasks/RetrieveRelationshipAsyncTask.java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/fr/gouv/etalab/mastodon/asynctasks/RetrieveRelationshipAsyncTask.java')
-rw-r--r--app/src/main/java/fr/gouv/etalab/mastodon/asynctasks/RetrieveRelationshipAsyncTask.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/asynctasks/RetrieveRelationshipAsyncTask.java b/app/src/main/java/fr/gouv/etalab/mastodon/asynctasks/RetrieveRelationshipAsyncTask.java
index 2c539378f..7f010b437 100644
--- a/app/src/main/java/fr/gouv/etalab/mastodon/asynctasks/RetrieveRelationshipAsyncTask.java
+++ b/app/src/main/java/fr/gouv/etalab/mastodon/asynctasks/RetrieveRelationshipAsyncTask.java
@@ -23,6 +23,7 @@ import fr.gouv.etalab.mastodon.activities.MainActivity;
import fr.gouv.etalab.mastodon.client.API;
import fr.gouv.etalab.mastodon.client.Entities.Error;
import fr.gouv.etalab.mastodon.client.Entities.Relationship;
+import fr.gouv.etalab.mastodon.client.GNUAPI;
import fr.gouv.etalab.mastodon.client.PeertubeAPI;
import fr.gouv.etalab.mastodon.interfaces.OnRetrieveRelationshipInterface;
@@ -49,10 +50,14 @@ public class RetrieveRelationshipAsyncTask extends AsyncTask<Void, Void, Void> {
@Override
protected Void doInBackground(Void... params) {
- if(MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.MASTODON) {
+ if (MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.MASTODON || MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.PLEROMA) {
API api = new API(this.contextReference.get());
relationship = api.getRelationship(accountId);
error = api.getError();
+ } else if (MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.GNU || MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.FRIENDICA){
+ GNUAPI gnuapi = new GNUAPI(this.contextReference.get());
+ relationship = gnuapi.getRelationship(accountId);
+ error = gnuapi.getError();
}else {
PeertubeAPI api = new PeertubeAPI(this.contextReference.get());
relationship = new Relationship();