This commit is contained in:
nuclearfog 2023-01-29 22:58:38 +01:00
parent 687583fc54
commit 023cadfbdd
No known key found for this signature in database
GPG Key ID: 03488A185C476379
1 changed files with 7 additions and 7 deletions

View File

@ -556,7 +556,7 @@ public class Mastodon implements Connection {
@Override
public UserList createUserlist(UserListUpdate update) throws MastodonException {
List<String> params = new ArrayList<>();
params.add("title=" + update.getTitle());
params.add("title=" + StringTools.encode(update.getTitle()));
try {
return createUserlist(post(ENDPOINT_USERLIST, params));
} catch (IOException e) {
@ -568,7 +568,7 @@ public class Mastodon implements Connection {
@Override
public UserList updateUserlist(UserListUpdate update) throws MastodonException {
List<String> params = new ArrayList<>();
params.add("title=" + update.getTitle());
params.add("title=" + StringTools.encode(update.getTitle()));
try {
return createUserlist(put(ENDPOINT_USERLIST + update.getId(), params));
} catch (IOException e) {
@ -661,19 +661,19 @@ public class Mastodon implements Connection {
@Override
public void sendDirectmessage(long id, String message, long mediaId) throws MastodonException {
throw new MastodonException("not implemented!"); // todo add implementation
throw new MastodonException("not supported!");
}
@Override
public void deleteDirectmessage(long id) throws MastodonException {
throw new MastodonException("not implemented!"); // todo add implementation
throw new MastodonException("not supported!");
}
@Override
public Messages getDirectmessages(String cursor) throws MastodonException {
throw new MastodonException("not implemented!"); // todo add implementation
throw new MastodonException("not supported!");
}
@ -710,8 +710,8 @@ public class Mastodon implements Connection {
List<InputStream> streams = new ArrayList<>();
List<String> keys = new ArrayList<>();
params.add("display_name=" + update.getName());
params.add("note=" + update.getDescription().replace('\n', ' '));
params.add("display_name=" + StringTools.encode(update.getName()));
params.add("note=" + StringTools.encode(update.getDescription()));
if (update.getProfileImageStream() != null) {
streams.add(update.getProfileImageStream());
keys.add("avatar");