Allow a custom message part for the periodic query task

This commit is contained in:
eikek
2022-01-11 22:50:19 +01:00
parent dd9937740a
commit 404fb2a37f
19 changed files with 128 additions and 44 deletions

View File

@ -106,6 +106,7 @@ object PeriodicDueItemsTask {
ctx.args.account,
ctx.args.baseUrl,
items,
None,
limit,
now
)(cont)

View File

@ -143,6 +143,7 @@ object PeriodicQueryTask {
ctx.args.account,
ctx.args.baseUrl,
items,
ctx.args.contentStart,
limit,
now
)(cont)

View File

@ -45,6 +45,7 @@ trait TaskOperations {
account: AccountId,
baseUrl: Option[LenientUri],
items: Vector[ListItem],
contentStart: Option[String],
limit: Int,
now: Timestamp
)(cont: EventContext => F[Unit]): F[Unit] =
@ -52,7 +53,7 @@ trait TaskOperations {
case Some(nel) =>
val more = items.size >= limit
val eventCtx = ItemSelectionCtx(
Event.ItemSelection(account, nel.map(_.id), more, baseUrl),
Event.ItemSelection(account, nel.map(_.id), more, baseUrl, contentStart),
ItemSelectionCtx.Data
.create(account, items, baseUrl, more, now)
)