mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-01-14 20:27:12 +01:00
Fix NullPointerException in Utils.parseInlineEmotes.
This commit is contained in:
parent
05e9b8b36e
commit
3fa86984dc
@ -190,6 +190,7 @@ public final class Utils {
|
||||
|
||||
public static String parseInlineEmotes(String markdown, JSONObject mediaMetadataObject) throws JSONException {
|
||||
JSONArray mediaMetadataNames = mediaMetadataObject.names();
|
||||
if (mediaMetadataNames != null) {
|
||||
for (int i = 0; i < mediaMetadataNames.length(); i++) {
|
||||
if (!mediaMetadataNames.isNull(i)) {
|
||||
String mediaMetadataKey = mediaMetadataNames.getString(i);
|
||||
@ -216,6 +217,7 @@ public final class Utils {
|
||||
markdown = markdown.replace("![img](" + emote_id + ")", "[" + emote_type + "](" + emote_url + ") ");
|
||||
}
|
||||
}
|
||||
}
|
||||
return markdown;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user