AddInvoice: send message to buyer on cancel#425
Conversation
WalkthroughThe pull request introduces a minor enhancement to the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/app/cancel.rs (1)
258-267: LGTM, but consider notifying the seller as well.The implementation correctly sends a cancellation message to the buyer. However, unlike the other branch (where the buyer is the creator), the seller is not notified of the cancellation.
Consider adding a notification for the seller to maintain consistent behavior:
// Confirmation message to buyer send_new_order_msg( request_id, Some(order.id), Action::Canceled, None, &event.rumor.pubkey, None, ) .await; + // Notify seller of cancellation + send_new_order_msg( + None, + Some(order.id), + Action::Canceled, + None, + &seller_pubkey, + None, + ) + .await;
Summary by CodeRabbit