[bugfix] support endless polls, and misskey's' method of inferring expiry in closed polls (#2349)

This commit is contained in:
kim
2023-11-11 10:15:04 +00:00
committed by GitHub
parent ba9d6b467a
commit deaea100c3
16 changed files with 212 additions and 52 deletions

View File

@@ -708,8 +708,10 @@ func (c *Converter) addPollToAS(ctx context.Context, poll *gtsmodel.Poll, dst ap
optionsProp.AppendActivityStreamsNote(note)
}
// Set poll endTime property.
ap.SetEndTime(dst, poll.ExpiresAt)
if !poll.ExpiresAt.IsZero() {
// Set poll endTime property.
ap.SetEndTime(dst, poll.ExpiresAt)
}
if !poll.ClosedAt.IsZero() {
// Poll is closed, set closed property.