Skip to content

Commit

Permalink
Fix missing reason when transferring sonhos
Browse files Browse the repository at this point in the history
  • Loading branch information
MrPowerGamerBR committed Jan 3, 2025
1 parent 760a5a3 commit 7db4b91
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import net.perfectdreams.loritta.morenitta.utils.stripCodeMarks
import net.perfectdreams.loritta.morenitta.website.utils.extensions.respondJson
import net.perfectdreams.loritta.morenitta.websiteinternal.loripublicapi.*
import net.perfectdreams.loritta.publichttpapi.LoriPublicHttpApiEndpoints
import net.perfectdreams.loritta.serializable.SonhosTransferRequestMetadata
import net.perfectdreams.loritta.serializable.UserId
import org.jetbrains.exposed.sql.insertAndGetId
import java.time.Instant
Expand Down Expand Up @@ -212,6 +213,11 @@ class PostTransferSonhosRoute(m: LorittaBot) : LoriPublicAPIGuildRoute(
it[SonhosTransferRequests.requestedAt] = now
it[SonhosTransferRequests.expiresAt] = nowPlusTimeToLive
it[SonhosTransferRequests.giverAcceptedAt] = now // The bot should automatically accept the transfer request
it[SonhosTransferRequests.metadata] = Json.encodeToString<SonhosTransferRequestMetadata>(
SonhosTransferRequestMetadata.APIInitiatedSonhosTransferRequestMetadata(
request.reason
)
)
}
}

Expand Down

0 comments on commit 7db4b91

Please sign in to comment.