Manage relationship for pixelfed
This commit is contained in:
parent
4d8c276d65
commit
06e3a3137d
|
@ -50,7 +50,7 @@ public class RetrieveRelationshipAsyncTask extends AsyncTask<Void, Void, Void> {
|
||||||
@Override
|
@Override
|
||||||
protected Void doInBackground(Void... params) {
|
protected Void doInBackground(Void... params) {
|
||||||
|
|
||||||
if (MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.MASTODON || MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.PLEROMA) {
|
if (MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.MASTODON || MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.PLEROMA || MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.PIXELFED) {
|
||||||
API api = new API(this.contextReference.get());
|
API api = new API(this.contextReference.get());
|
||||||
relationship = api.getRelationship(accountId);
|
relationship = api.getRelationship(accountId);
|
||||||
error = api.getError();
|
error = api.getError();
|
||||||
|
|
|
@ -2555,7 +2555,10 @@ public class API {
|
||||||
List<Relationship> relationships;
|
List<Relationship> relationships;
|
||||||
Relationship relationship = null;
|
Relationship relationship = null;
|
||||||
HashMap<String, String> params = new HashMap<>();
|
HashMap<String, String> params = new HashMap<>();
|
||||||
params.put("id", accountId);
|
if( MainActivity.social == UpdateAccountInfoAsyncTask.SOCIAL.PIXELFED)
|
||||||
|
params.put("id[]", accountId);
|
||||||
|
else
|
||||||
|
params.put("id", accountId);
|
||||||
try {
|
try {
|
||||||
String response = new HttpsConnection(context, this.instance).get(getAbsoluteUrl("/accounts/relationships"), 10, params, prefKeyOauthTokenT);
|
String response = new HttpsConnection(context, this.instance).get(getAbsoluteUrl("/accounts/relationships"), 10, params, prefKeyOauthTokenT);
|
||||||
relationships = parseRelationshipResponse(new JSONArray(response));
|
relationships = parseRelationshipResponse(new JSONArray(response));
|
||||||
|
|
Loading…
Reference in New Issue