Skip to content

fix(notifications): show amount and title in payment request pushes - #1872

Merged
bmc08gt merged 1 commit into
code/cashfrom
fix/request-push-details
Oct 28, 2026
Merged

bmc08gt merged 1 commit into
code/cashfrom
fix/request-push-details

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

A push for a payment request carries only the request id. The notification fell back to the server's generic body, and in a private group, where the request text is sealed, to a stand-in that names neither the amount nor the title.

NotificationService now spots a WidgetContent.PaymentRequest in the pushed message and fetches it through PaymentRequests.fetch, which opens sealed titles. The fetch has a 5s limit, matching the avatar load. A new pure planPaymentRequestBody builds the text: "Requested $X for {title}", "Requested $X", or "Sent request for {title}". MessagingStyle already shows the sender, so the text leaves the name out. The amount is the viewer's own share when they have one, otherwise the whole split.

If the fetch fails or times out, or the request belongs to another chat, the body is the same as today. Tapping still opens the chat.

PaymentRequestBodyPlannerTest covers the planner.

A push for a payment-request widget carries only the request id, so the
notification kept the server's generic body, and in a private group a
stand-in because the request text is sealed.

Fetch the request (bounded to 5s like the avatar load), take the opened
title and the viewer's share (or the whole split), and post
"Requested $X for {title}". A failed or timed-out fetch, or a request
from another chat, keeps today's body.
@bmc08gt bmc08gt self-assigned this Oct 28, 2026
@github-actions github-actions Bot added area: notifications Push notifications, in-app messaging type: fix Bug fix labels Oct 28, 2026
@bmc08gt
bmc08gt merged commit 859d40a into code/cash Oct 28, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: notifications Push notifications, in-app messaging type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant