Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Noe/fix profiles 0x #791

Merged
merged 10 commits into from
Sep 20, 2024
Merged

Noe/fix profiles 0x #791

merged 10 commits into from
Sep 20, 2024

Conversation

nmalzieu
Copy link
Collaborator

Profiles could show as 0x for 1:1 conversations

Our profiles data was a bit messed up

  • we were using mmkv + sqlite persistence but not always updating sqlite. I removed the profile table from sqlite to rely only on mmkv (extensions use mmkv only)
  • group members addresses are lowercased in the SDK but 1:1 convos peerAddress is formatted. This can lead to inconsistencies; opened a failing test here to showcase the issue: Failing test group members formatting xmtp/xmtp-react-native#497
  • changing Converse code to always check the current address + a lowercased & a formatted version to match all cases
  • we were still computing a "conversationTitle" for 1:1 based on current profile data and saving it for reuse in notifications => removing that as now the notification extension can directly access the profile data from mmkv and even refresh it when necessary

@nmalzieu nmalzieu requested a review from a team as a code owner September 20, 2024 15:19
@nmalzieu nmalzieu linked an issue Sep 20, 2024 that may be closed by this pull request
Copy link
Collaborator

@cameronvoell cameronvoell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code updates look good. I also tested on dev network with an account that had existing v2 conversations and groups. Names showed up as expected.

I created an issue in the RN SDK to normalize address capitalization between V2 and groups to help other who would encounter similar issues => xmtp/xmtp-react-native#498

Nice fix!

@saulmc saulmc merged commit 5433522 into main Sep 20, 2024
5 checks passed
@saulmc saulmc deleted the noe/fix-profiles-0x branch September 20, 2024 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1:1 conversations showing as 0x
4 participants