Merge branch 'fix_nitter_timelines' into 'develop'

Nitter feeds: Don't add a comma after the last username

Closes #464

See merge request tom79/fedilab!1014
This commit is contained in:
Thomas 2020-08-04 18:42:07 +02:00
commit 5837b47ccb
1 changed files with 9 additions and 2 deletions

View File

@ -3465,8 +3465,15 @@ public class API {
return apiResponse;
}
StringBuilder urlparams = new StringBuilder();
for (String param : usernames) {
urlparams.append(param.trim()).append(",");
{
int i = 0;
while (i < usernames.length) {
String username = usernames[i].trim();
urlparams.append(username);
if (i != usernames.length - 1) urlparams.append(",");
i++;
}
}
String url = "https://" + nitterHost + "/" + urlparams + "/rss";