fix filtered crash in scheduled posts

closes sk22#408
This commit is contained in:
sk 2023-02-06 14:00:52 +01:00
parent c51be5f199
commit dae347a29f
2 changed files with 2 additions and 7 deletions

View File

@ -62,19 +62,13 @@ public class ScheduledStatus extends BaseModel implements DisplayItemsParent{
}
public Status toStatus() {
Status s = new Status();
s.id = id;
Status s = Status.ofFake(id, params.text, scheduledAt);
s.mediaAttachments = mediaAttachments;
s.createdAt = scheduledAt;
s.inReplyToId = params.inReplyToId > 0 ? "" + params.inReplyToId : null;
s.content = s.text = params.text;
s.spoilerText = params.spoilerText;
s.visibility = params.visibility;
s.language = params.language;
s.sensitive = params.sensitive;
s.mentions = List.of();
s.tags = List.of();
s.emojis = List.of();
if (params.poll != null) s.poll = params.poll.toPoll();
return s;
}

View File

@ -160,6 +160,7 @@ public class Status extends BaseModel implements DisplayItemsParent{
s.mentions = List.of();
s.tags = List.of();
s.emojis = List.of();
s.filtered = List.of();
return s;
}
}