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

V3 group streaming #239

Merged
merged 7 commits into from
Feb 8, 2024
Merged

V3 group streaming #239

merged 7 commits into from
Feb 8, 2024

Conversation

nakajima
Copy link
Contributor

@nakajima nakajima commented Feb 6, 2024

Relies on #229.

@nakajima nakajima changed the base branch from main to v3-groups February 6, 2024 22:38
Copy link
Contributor

@nplasterer nplasterer left a comment

Choose a reason for hiding this comment

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

This looks good maybe a bad merge with main because of all the env stuff in the diff?
Might be worth trying to tackle the more difficult item of streaming both conversations and groups at the same time.

@@ -48,6 +63,18 @@ public actor Conversations {
return try await v3Client.conversations().list(opts: options).map { $0.fromFFI(client: client) }
}

public func streamGroups() async throws -> AsyncThrowingStream<Group, Error> {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure how you're going to stream both groups and conversations at the same time. But to be able to do this in Android the stream had to return the same type.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Currently planning on holding off on having a combined stream until we do the Conversation -> DM rename. Then we can just have that stream return the union.

Sources/XMTPiOS/Extensions/Ffi.swift Outdated Show resolved Hide resolved
@nakajima nakajima marked this pull request as ready for review February 8, 2024 05:19
@nakajima nakajima requested a review from a team as a code owner February 8, 2024 05:19
@nakajima nakajima merged commit 8b5706c into v3-groups Feb 8, 2024
1 check passed
@nakajima nakajima deleted the v3-group-streaming branch February 8, 2024 16:55
nakajima added a commit that referenced this pull request Feb 8, 2024
* 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]>
kele-leanes pushed a commit that referenced this pull request Feb 19, 2024
* 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]>
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.

2 participants