orbis.getConversations()
Returns an array of conversations
.
How to use?
let { data, error } = await orbis.getConversations(options);
Parameters
options
: JSON object that contains the filters you can use in this query such asdid
:string
DiD of the user for whom we are retrieving the conversationscontext
:string
optional
Context for which you want to retrieve the conversations
Returns
/** Returns an array of conversations */
[
{
stream_id: "k...",
context: "..." or null,
recipients: [
"did:pkh:...",
"did:pkh:...",
"did:pkh:..."
],
recipient_details: [
{
did: "did:pkh:eip155:1:0x075286d1a22b083ebcaf6b7fb4cf970cfc4a18f0",
profile: {
pfp: "https://arweave.net/QwZGtefxAtCAE5KYWP2H59F5kZ5sCJdqMJP9szFEFHM",
username: "Baptiste",
description: "..."
}
}, {
did: "did:pkh:eip155:1:0x222bc13f54b2f14e41945c9f2f3b9f00b4ec9b40",
profile: {
pfp: "https://arweave.net/LvZcb6xBhVr7m93Ta3O9a9R5fiRj5BWvGKQ0wgCS7Yo",
username: "OrbisTester",
description: "..."
}
}
],
last_message_timestamp: 1656580635
},
...
]
Next steps
Explore other parts of the API.