Repository navigation
0.22.0
Synced to flipcash2-protobuf-api@b655df17,
picking up #157,
#158 and
#159. chat.v1,
messaging.v1 and common.v1 moved.
This release adds invite links for private groups, plus anonymous reads of an invite and the
chat's roster. Upgrading breaks source in Swift only, not the wire. One enum gained cases,
appended at the end, so no existing value moved.
Breaking
chat.v1.GetKeyEnvelopeResponse.key_envelope(field 2) moved into a newoneof envelope, next
toinvite_key_bundle. Swift loseshasKeyEnvelopeandclearKeyEnvelope; switch on
envelopeinstead. Kotlin keepshasKeyEnvelope()and gainsgetEnvelopeCase(). In either
language, a client that reads onlykey_envelopesees an empty envelope for a member who joined
with an invite.common.v1.Usernamenow accepts 2 to 30 characters, up from 15. Nothing fails to compile, but a
client that validates, matches or encodes usernames at 15 will reject or truncate names the
server now issues.
Added
- Invite RPCs on
chat.v1.Chat:CreateInvite,GetInvite,GetChatInvitesand
RevokeInvite, withInvite,Invite.Status,InviteId,InviteToken,InviteKeyEnvelope
andInviteSecretEnvelope. Only a private group's creator may create, list or revoke invites
today.GetInvitetakes optionalauth, so a link can be previewed without an account. - The
Invitedocs specify the client-side crypto: how the token, wrap key and invite ID derive
from the link's secret (HKDF-SHA256 and SHA-256), the XChaCha20-Poly1305 encryption of the
chat key, and the creator's Ed25519 signature over it. iOS and Android must compute these
identically. JoinChatRequest.invite(field 2), anInviteParameterswith the invite token and the joiner's
InviteSecretEnvelope. A private group can now be joined with an invite.JoinChatResponse.ResultcasesINVITE_NOT_FOUND = 5,INVITE_EXHAUSTED = 6,
INVITE_EXPIRED = 7andINVITE_REVOKED = 8, all appended. An exhaustiveswitchorwhen
over the result needs them before it compiles.GetKeyEnvelopeResponse.invite_key_bundle(oneof field 5), returned instead ofkey_envelope
to a member who joined with an invite and has not yet stored their own envelope with
SetKeyEnvelope.GetKeyEnvelopeResponse.wrapped_by_public_key(field 4).GetRosterRequest.invite_token(field 3). A link holder can read the roster with it.chat.v1.ViewerState.Permissions.can_invite(field 3).messaging.v1.SystemContentmember-joined oneof gainsinvited(field 4), anInvitednaming
invited_by. A client that renders join messages needs a case for it.
Changed
GetRosterRequest.authis no longer required wheninvite_tokenis set. A request with
neither is stillDENIED.GetChaton a private group without auth now returns itsMetadatarecord instead of
DENIED. Its messaging state stays private.JoinChaton a private group by anyone but the creator is no longer alwaysDENIED: it
succeeds with anACTIVEinvite. An invite join also removes the user from the lobby and is
announced asRosterUpdate.MemberJoined, like an admission.
Unchanged
Nothing was renumbered. No service, RPC, field or enum case was removed. Apart from the oneof
move above, no field changed type or number.