Skip to content

Conversation

@jazzz
Copy link
Collaborator

@jazzz jazzz commented Nov 27, 2025

Problem

The sendMessage function on Conversations required developers to pass in a a DS instance. Which adds confusion, and is a potential source of issues. To maintain the cleanest API, it should be removed.

Eg:
discard await convo.sendMessage(raya.ds, content)
vs
discard await convo.sendMessage(content)

This requirement was left over from when the Conversations API was generic over the DeliverySerivce. There was difficulty in making the conversation abstractions work with the stored generic parameter nicely. To make progress, the DS parameter was passed in to make it function, with plans to revisit.

Solution

As Client is no longer generic over DS, the parameter is no longer required. This PR makes the conversations api, WakuClient aware. Conversation types such as PrivateV1 are initialized with a delivery service, and it uses its stored reference when sendMessage is called.

This makes the external API cleaner, and easier to use.

@jazzz jazzz requested a review from kaichaosun November 27, 2025 01:13
@jazzz jazzz merged commit bce9dfe into main Nov 27, 2025
1 check passed
@jazzz jazzz deleted the jazzz/send_remove_ds branch December 1, 2025 04:55
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.

3 participants