@@ -320,6 +320,31 @@ class GroupTest {
320
320
}
321
321
}
322
322
323
+ @Test
324
+ fun testCanStreamAllGroupMessages () = kotlinx.coroutines.test.runTest {
325
+ val group = caroClient.conversations.newGroup(listOf (alix.walletAddress))
326
+ alixClient.conversations.syncGroups()
327
+ alixClient.conversations.streamAllGroupMessages().test {
328
+ group.send(" hi" )
329
+ assertEquals(" hi" , awaitItem().encodedContent.content.toStringUtf8())
330
+ group.send(" hi again" )
331
+ assertEquals(" hi again" , awaitItem().encodedContent.content.toStringUtf8())
332
+ }
333
+ }
334
+
335
+ @Test
336
+ fun testCanStreamAllMessages () = kotlinx.coroutines.test.runTest {
337
+ val group = caroClient.conversations.newGroup(listOf (alix.walletAddress))
338
+ val conversation = boClient.conversations.newConversation(alix.walletAddress)
339
+ alixClient.conversations.syncGroups()
340
+ alixClient.conversations.streamAllMessages().test {
341
+ group.send(" hi" )
342
+ assertEquals(" hi" , awaitItem().encodedContent.content.toStringUtf8())
343
+ conversation.send(" hi again" )
344
+ assertEquals(" hi again" , awaitItem().encodedContent.content.toStringUtf8())
345
+ }
346
+ }
347
+
323
348
@Test
324
349
fun testCanStreamDecryptedGroupMessages () = kotlinx.coroutines.test.runTest {
325
350
val group = boClient.conversations.newGroup(listOf (alix.walletAddress))
@@ -333,6 +358,31 @@ class GroupTest {
333
358
}
334
359
}
335
360
361
+ @Test
362
+ fun testCanStreamAllDecryptedGroupMessages () = kotlinx.coroutines.test.runTest {
363
+ val group = caroClient.conversations.newGroup(listOf (alix.walletAddress))
364
+ alixClient.conversations.syncGroups()
365
+ alixClient.conversations.streamAllGroupDecryptedMessages().test {
366
+ group.send(" hi" )
367
+ assertEquals(" hi" , awaitItem().encodedContent.content.toStringUtf8())
368
+ group.send(" hi again" )
369
+ assertEquals(" hi again" , awaitItem().encodedContent.content.toStringUtf8())
370
+ }
371
+ }
372
+
373
+ @Test
374
+ fun testCanStreamAllDecryptedMessages () = kotlinx.coroutines.test.runTest {
375
+ val group = caroClient.conversations.newGroup(listOf (alix.walletAddress))
376
+ val conversation = boClient.conversations.newConversation(alix.walletAddress)
377
+ alixClient.conversations.syncGroups()
378
+ alixClient.conversations.streamAllDecryptedMessages().test {
379
+ group.send(" hi" )
380
+ assertEquals(" hi" , awaitItem().encodedContent.content.toStringUtf8())
381
+ conversation.send(" hi again" )
382
+ assertEquals(" hi again" , awaitItem().encodedContent.content.toStringUtf8())
383
+ }
384
+ }
385
+
336
386
@Test
337
387
fun testCanStreamGroups () = kotlinx.coroutines.test.runTest {
338
388
boClient.conversations.streamGroups().test {
0 commit comments