feat(profile,chat): profile pictures + tip DM service-layer support#1106
Merged
Conversation
Scaffold the SetProfilePicture RPC across the service layer (Api -> Service -> Repository -> Controller) with a SetProfilePictureError sealed type covering the proto result cases (DENIED, BLOB_NOT_FOUND/NOT_READY/REJECTED, INVALID_BLOB). The response's blob.v1.Media is mapped to the domain MediaItem. Propagate the new UserProfile.profile_picture field: add UserProfile.profilePicture (MediaItem), map it in UserProfileMapper and the inline chat-member profile builder, and persist it via UserProfileSerialized (+ compat DTO and the entity mappers). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
bmc08gt
force-pushed
the
feat/flipcash-profile-and-tip-dm
branch
from
July 20, 2026 22:13
6ee493f to
1b1bf53
Compare
Wire up the service-layer pieces for tip DMs introduced by the proto sync: - buildTipDmPaymentMetadata() builds the intent AppMetadata for a tip DM payment (user-id to user-id, no phone source/destination) - ResolverController.resolveByUserId() resolves a user ID to their on-chain address via the resolver Identifier.user_id arm, added through Api/Service/Repo - getDmChatFeed now takes a required ChatType so callers filter explicitly for CONTACT_DM vs TIP_DM (threaded through Api/Service/Repo/Controller). No default, so intent is always stated; feed sync passes CONTACT_DM to preserve behaviour. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
bmc08gt
force-pushed
the
feat/flipcash-profile-and-tip-dm
branch
from
July 20, 2026 22:17
1b1bf53 to
fa15872
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Builds out the net-new (P3) service-layer features enabled by the flipcash proto sync (#1105). Two commits, two coherent bundles:
feat(profile)— profile picturesfeat(chat,resolver)— tip DM supportNo UI is wired yet; this is the service/domain/persistence plumbing the upcoming features will consume.
Profile pictures
ProfileApi→ProfileService→ProfileRepository/InternalProfileRepository→ProfileController, with aSetProfilePictureErrorsealed type covering every proto result (DENIED,BLOB_NOT_FOUND,BLOB_NOT_READY,BLOB_REJECTED,INVALID_BLOB). The responseblob.v1.Mediamaps to the domainMediaItem.UserProfile.profilePicturepropagated end-to-end: domain model,UserProfileMapper, the inline chat-member profile builder, and persistence (UserProfileSerialized+ compat DTO + entity mappers).Tip DMs
buildTipDmPaymentMetadata()builds the intentAppMetadatafor a user-id↔user-id tip payment (no phone source/destination).Identifier.user_idarm. TheIdentifieroneof is modeled as a domainResolveIdentifier(Phone|UserId), soResolverApi/ResolverService/ResolverRepositoryeach expose a singleresolve(owner, identifier)— the phone-vs-user-id branch lives in exactly one place (proto construction).ResolverControllerkeeps two ergonomic entry points (resolve(phone)/resolveByUserId(userId)) that delegate to it, so existing callers (e.g.ContactCoordinator) are unchanged.getDmChatFeed(chatType)now takes a requiredChatTypeso callers filterCONTACT_DMvsTIP_DMexplicitly (threaded through Api/Service/Repo/Controller). No default — the server maps a missing/UNKNOWNvalue toCONTACT_DM, so a silent default would hide intent. Feed sync passesCONTACT_DM, preserving current behaviour.Tests
UserProfileMappercases for profile-picture mapping (present + absent).ChatControllertest asserting the chat-type filter is forwarded; existing feed tests updated for the required param.FakeProfileRepository,FakeChatRepository, chat-coordinator mocks).Verification
:services:flipcash:testDebugUnitTest,:apps:flipcash:shared:chat:testDebugUnitTest, and:apps:flipcash:shared:persistence:db:testDebugUnitTestall pass;:apps:flipcash:shared:contacts(theresolve(phone)caller) compiles.Deferred
UI consumers, and actually consuming
EventStreamingController.blobUpdatesfor upload-completion, remain for the feature work that builds on this.