keep futures after #10067
parent
ff8810f14f
commit
5f1097c51c
|
@ -132,12 +132,11 @@ $regards
|
|||
}
|
||||
}
|
||||
|
||||
def onPatronNew(userId: User.ID): Unit =
|
||||
userRepo named userId foreach {
|
||||
_.map { user =>
|
||||
def onPatronNew(userId: User.ID): Funit =
|
||||
userRepo named userId map {
|
||||
_ foreach { user =>
|
||||
alsoSendAsPrivateMessage(user)(
|
||||
body = _ =>
|
||||
s"""Thank you for supporting Lichess!
|
||||
body = _ => s"""Thank you for supporting Lichess!
|
||||
|
||||
Thank you for your donation to Lichess - your patronage directly goes to keeping the site running and new features coming.
|
||||
Lichess is entirely funded by user's donations like yours, and we truly appreciate the help we're getting.
|
||||
|
@ -146,9 +145,9 @@ As a small token of our thanks, your account now has the awesome Patron wings!""
|
|||
}
|
||||
}
|
||||
|
||||
def onPatronStop(userId: User.ID): Unit =
|
||||
userRepo named userId foreach {
|
||||
_.map { user =>
|
||||
def onPatronStop(userId: User.ID): Funit =
|
||||
userRepo named userId map {
|
||||
_ foreach { user =>
|
||||
alsoSendAsPrivateMessage(user)(
|
||||
body = _ => s"""End of Lichess Patron subscription
|
||||
|
||||
|
@ -162,7 +161,7 @@ To make a new donation, head to $baseUrl/patron"""
|
|||
|
||||
def onPatronGift(from: User.ID, to: User.ID, lifetime: Boolean): Funit =
|
||||
userRepo.pair(from, to) map {
|
||||
_ ?? { case (from, to) =>
|
||||
_ foreach { case (from, to) =>
|
||||
val wings =
|
||||
if (lifetime) "lifetime Patron wings"
|
||||
else "Patron wings for one month"
|
||||
|
|
Loading…
Reference in New Issue