createConversation static method
Creates a conversation with the users specified by userIds.
The image
argument can be used to give an image to the conversation.
Implementation
static Future<Conversation> createConversation(
List<String> userIds, {
String? image,
}) async {
MercuryRequest req = await _req();
if (!userIds.contains(currentUser.id)) userIds.add(currentUser.id);
req.conversation = Conversation(
users: userIds.map((_) => User(id: _)),
image: image,
);
MercuryResponse res = await _client.createConversation(req);
return res.conversation;
}