-
Notifications
You must be signed in to change notification settings - Fork 24
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
Introduce group chat to xmtp-ios #229
Conversation
@nakajima If you let me know what commit in libxmtp you would like bindings from, I should be able to create static lib bindings that will work for you in Package.swift. Let me know and I can add it as a PR on to this one. |
@cameronvoell I think whatever is on main should have everything I need? So xmtp/libxmtp@60ee755 should do it. |
@cameronvoell Things seem to work pointing at xmtp/libxmtp-swift#6. Thanks for the libxmtp fix! |
Co-authored-by: Cameron Voell <[email protected]>
Tested on RN via PR here https://github.com/xmtp/xmtp-react-native/pull/234/files. Standard V2 features all look good. Looking forward to integrating ios groups on RN, nice work! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be nice to pull out the client creation from the rest of the group stuff so that it's easier to review. I just took another pass on that but not the rest of the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this PR is missing the call to list both groups and conversations in the same call. https://github.com/xmtp/xmtp-android/pull/160/files#diff-479fe53ececf1836cd910bfba9a721b20fce9fd212b204329abef95ff79429f9R220-R255
But probably okay to do that in a follow up.
Don't forget to bump the pod spec.
let erroredAddresses = try await withThrowingTaskGroup(of: (String?).self) { group in | ||
for address in addresses { | ||
group.addTask { | ||
if try await self.client.canMessageV3(address: address) { | ||
return nil | ||
} else { | ||
return address | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like how you handled this. I can improve this on android for sure.
Nevermind, I think we should wait until the Conversation -> DirectMessage rename. |
* ui updates, fix lint * Add streaming * use convo id * bump podspec
* Introduce group chat to xmtp-ios * fix lint, add address to example app for groups * paginate * Handle membership changes in example app * Make syncing explicit * Pass legacySignedPrivateKeyProto * add more validations * Add ClientOptions.enableAlphaMLS * Make group changes codec opt-in * Point to libxmtp-swift package, not local filesystem * Update Package.swift Co-authored-by: Cameron Voell <[email protected]> * bump podspec * include env in db url * extract method * return members as strings not objects * Error when trying to enable alpha MLS with no signer and no keys * pass encryption key * Move client test to clientests * Pull v3 client into its own PR * Update GroupMembershipChanged.swift * Add tests * rename mls alpha * fix codec * cleanup * Fix example app (needed to add manual syncs) * Update GroupMembershipChanged.swift * fix nav * cleanup * add group settings view * rename members to member addresses * uncomment local node skip * improve group error * use group id for topic * fix lint * allow mls on dev, other cleanup * V3 group streaming (#239) * ui updates, fix lint * Add streaming * use convo id * bump podspec * bump podspec --------- Co-authored-by: Cameron Voell <[email protected]>
Begins to introduce group chats to xmtp-ios. Right now, chats are loaded by calling
client.conversations.groups()
. The example app has been updated to call this and combine groups with conversations under theConversationOrGroup
enum. Once this PR lands, we'll embark on a broader change whereConversation
is renamed toDirectMessage
which will free up theConversation
name to be a union ofDirectMessage
andGroup
.TODO:
The most recent version of libxmtp-swift bindings didn't build correctly for me so I switched back to building a dylib in my local libxmtp for now. It was missing the LegacyIdentitySource stuff needed for client creation. We'll need to work that out before merging.doneMessage/Group PaginationdoneHandle GroupMemberChanged messages in the example appdoneHere's some screenshots from the example app: