Repository navigation
0.21.0
Synced to flipcash2-protobuf-api@b77bf78f,
picking up #151,
#152 (docs only),
#154 (docs only),
#155 and
#156. paymentrequest.v1 is
new. activity.v1, chat.v1, intent.v1 and messaging.v1 moved.
This release adds payment requests (group splits), payments to several group members at once, and
moderation RPCs for group creators. Upgrading breaks source, not the wire. CashContent renamed
two fields and moved one into a oneof, so code reading amount or receiver stops compiling. Two
enums gained a case, appended at the end, so no existing value moved.
Breaking
messaging.v1.CashContent.amount(field 2) is nowtotal_amount. Same type and number. For a
payment to several people it is the whole payment.messaging.v1.CashContent.receiver(field 3) is nowsingle_receiver, inside a new
oneof recipient. Kotlin'sgetReceiver()/hasReceiver()becomegetSingleReceiver()/
hasSingleReceiver(); Swift'sreceiverbecomessingleReceiver. An older DM message that
predates per-message receivers still has neither member of the oneof set.
The binary encoding of both fields is unchanged, so messages written before and after the rename
decode the same way.
Added
paymentrequest.v1.PaymentRequest, a new service with five RPCs:CreatePaymentRequest,
GetPaymentRequest,GetChatPaymentRequests,ClosePaymentRequestandMarkPaid. The one kind
today is a split in a group chat (GroupChatPaymentRequestwith aSplitof per-member
Shares). DMs are not supported. No event announces a change to a request; clients refetch it.- In a private group the split's title and description are
EncryptedPaymentRequestTextunder
the chat key. Everything else, including shares and payments, is visible to the server. GetPaymentRequestResponse.payment_intent_idis the intent ID a debtor's payment of their share
must use. The server issues one per share, so a share is paid at most once.
- In a private group the split's title and description are
messaging.v1.PaymentRequestWidget, sent asWidgetContent.payment_request(oneof field 3). It
carries only the request's ID.intent.v1.ChatMetadata.requested_payment(oneof field 6), aRequestedPaymentnaming the
payment_request_idwhose share aSendPublicPaymentpays.messaging.v1.CashContent.multi_receiver(oneof field 5), aPaymentslist of 2 to 10
Payment { receiver, native_amount, quarks }. A group payment to several members is an ocp
SendPublicMultiPayment.messaging.v1.CashContent.payment_request_id(field 6), set only on the cash message posted when
a debtor pays their share.- Chat moderation RPCs on
chat.v1.Chat:SilenceUser,UnsilenceUser,BanUser,UnbanUserand
GetRestrictedUsers, withSilenceState,BanStateandRestrictedUser. The chat's creator
cannot be silenced or banned. chat.v1.ViewerState.restrictions(field 3), carrying the viewer'ssilence. A timed silence
lapses with no event, so the client owns the countdown.chat.v1.ViewerState.Permissions.moderation(field 2), aModerationPermissionswith
can_silenceandcan_ban.JoinChatResponse.Result.BANNED = 4andEnterLobbyResponse.Result.BANNED = 6, both appended.
An exhaustiveswitchorwhenover either needs the new case before it compiles.
Changed
- Reaction boosts are now allowed in DMs. A DM boost pays the other member the whole amount as one
SendPublicPayment. No field changed; theactivity.v1.BoostedReactionand
intent.v1.ChatMetadata.ReactionBoostdocs now cover DMs. SendMessageandEditMessagedocument thatENCRYPTION_REQUIREDalso applies to DMs.
Unchanged
Nothing was renumbered. No service, RPC or enum case was removed. Apart from the CashContent
rename above, no field was removed or changed type.