SDK Reference
Methods
GetConversations

getConversations

Returns an array of conversations for a DID.

Optionally the query can be scoped to a context.

How to use?

const { data, error } = await orbis.getConversations(options);

Parameters

  • options - object which contains the filters
    • 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
  },
  ...
]