···228228229229// updates ----------------------------------------------------------------------
230230231231+/// get a list of updates that were sent to a given user
232232+///
233233+pub fn updates_sent_to_user(
234234+ database on: sqlight.Connection,
235235+ user user: user.User,
236236+) -> Result(List(String), sqlight.Error) {
237237+ let #(sql, with, expecting) =
238238+ sql.all_updates_sent_to_user(user.id |> uuid.to_bit_array())
239239+240240+ let with = list.map(with, parrot_to_sqlight)
241241+242242+ use update <- result.try(sqlight.query(sql, on:, with:, expecting:))
243243+244244+ list.map(update, fn(update) { update.link_to_post })
245245+ |> Ok
246246+}
247247+231248/// checks if a given `user` has been sent a given `item`
232249///
233250pub fn was_update_sent_to_user(