Skip to content

Commit

Permalink
Fix LocalStoreLayout using wrong type on message nonce field
Browse files Browse the repository at this point in the history
Since nonce is an Object, passing a default value
of Possible-Object is valid under nonceOrElse,
creating a "valid" nested structure

This field makes sure nonce is passed a Possible
directly, skipping the Possible#of wrapping the
Object variant does
  • Loading branch information
quanticc committed Jun 19, 2023
1 parent ae5ec0c commit b8b955f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ public Mono<MessageData> onMessageUpdate(int shardIndex, MessageUpdate dispatch)
.mentionChannels(edited.mentionChannels())
.attachments(edited.attachments())
.embeds(edited.embeds())
.nonce(edited.nonceOrElse(m.nonce()))
.nonce(edited.isNoncePresent() ? edited.nonce() : m.nonce())
.pinned(edited.pinnedOrElse(m.pinned()))
.webhookId(edited.isWebhookIdPresent() ? edited.webhookId() : m.webhookId())
.type(edited.typeOrElse(m.type()))
Expand Down

0 comments on commit b8b955f

Please sign in to comment.