File tree 3 files changed +5
-5
lines changed
main/java/org/xmtp/android/library
test/java/org/xmtp/android/library
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -506,7 +506,7 @@ class Client() {
506
506
return apiClient.subscribe(request = request)
507
507
}
508
508
509
- fun fetchConversation (topic : String? , includeGroups : Boolean = false): Conversation ? {
509
+ suspend fun fetchConversation (topic : String? , includeGroups : Boolean = false): Conversation ? {
510
510
if (topic.isNullOrBlank()) return null
511
511
return conversations.list(includeGroups = includeGroups).firstOrNull {
512
512
it.topic == topic
Original file line number Diff line number Diff line change @@ -229,7 +229,7 @@ sealed class Conversation {
229
229
* If [limit] is specified then results are pulled in pages of that size.
230
230
* If [direction] is specified then that will control the sort order of te messages.
231
231
*/
232
- fun messages (
232
+ suspend fun messages (
233
233
limit : Int? = null,
234
234
before : Date ? = null,
235
235
after : Date ? = null,
@@ -262,7 +262,7 @@ sealed class Conversation {
262
262
}
263
263
}
264
264
265
- fun decryptedMessages (
265
+ suspend fun decryptedMessages (
266
266
limit : Int? = null,
267
267
before : Date ? = null,
268
268
after : Date ? = null,
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ class RemoteAttachmentTest {
79
79
)
80
80
}
81
81
82
- val messages = aliceConversation.messages()
82
+ val messages = runBlocking { aliceConversation.messages() }
83
83
Assert .assertEquals(messages.size, 1 )
84
84
85
85
if (messages.size == 1 ) {
@@ -161,7 +161,7 @@ class RemoteAttachmentTest {
161
161
)
162
162
}
163
163
164
- val messages = aliceConversation.messages()
164
+ val messages = runBlocking { aliceConversation.messages() }
165
165
Assert .assertEquals(messages.size, 1 )
166
166
167
167
// Tamper with the payload
You can’t perform that action at this time.
0 commit comments