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 as
  • did: string DiD of the user for whom we are retrieving the conversations
  • context: 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:0X01",
				profile: {
					pfp: "https://arweave.net/...",
					username: "Baptiste",
					description: "..."
				}
			}, {
				did: "did:pkh:eip155:1:0x02",
				profile: {
					pfp: "https://arweave.net/...",
					username: "OrbisTester",
					description: "..."
				}
			}
		],
		last_message_timestamp: 1656580635
	},
  ...
]