@@ -14,12 +14,14 @@ import org.xmtp.android.library.messages.Message
14
14
import org.xmtp.android.library.messages.MessageBuilder
15
15
import org.xmtp.android.library.messages.MessageV1Builder
16
16
import org.xmtp.android.library.messages.Pagination
17
+ import org.xmtp.android.library.messages.PagingInfoSortDirection
17
18
import org.xmtp.android.library.messages.Topic
18
19
import org.xmtp.android.library.messages.decrypt
19
20
import org.xmtp.android.library.messages.header
20
21
import org.xmtp.android.library.messages.sentAt
21
22
import org.xmtp.android.library.messages.toPublicKeyBundle
22
23
import org.xmtp.android.library.messages.walletAddress
24
+ import org.xmtp.proto.message.api.v1.MessageApiOuterClass
23
25
import java.util.Date
24
26
25
27
data class ConversationV1 (
@@ -41,8 +43,10 @@ data class ConversationV1(
41
43
limit : Int? = null,
42
44
before : Date ? = null,
43
45
after : Date ? = null,
46
+ direction : PagingInfoSortDirection = MessageApiOuterClass .SortDirection .SORT_DIRECTION_DESCENDING ,
44
47
): List <DecodedMessage > {
45
- val pagination = Pagination (limit = limit, before = before, after = after)
48
+ val pagination =
49
+ Pagination (limit = limit, before = before, after = after, direction = direction)
46
50
val result = runBlocking {
47
51
client.apiClient.envelopes(topic = topic.description, pagination = pagination)
48
52
}
0 commit comments