Skip to content

Commit

Permalink
feat(v1p): Give V1P users 1 extra potato per transact1on
Browse files Browse the repository at this point in the history
  • Loading branch information
Dav1dde committed Aug 27, 2024
1 parent a5eabe0 commit 5bb1d69
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Service/AwardService.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,16 @@ private function gibToUser(
): void {
$messagesTable = $this->fetchTable('Messages');

$amount = $event->amount;
if(str_contains($toUser->slack_name, '1')) {
// Give V1P users 1 extra potato on each transaction.
$amount += 1;
}

$message = $messagesTable->newEntity([
'sender_user_id' => $fromUser->id,
'receiver_user_id' => $toUser->id,
'amount' => $event->amount,
'amount' => $amount,
'type' => str_replace(':', '', $event->reaction),
], [
'accessibleFields' => [
Expand Down

0 comments on commit 5bb1d69

Please sign in to comment.