ApiCoreFunctions
Function: openDirect()
function openDirect(
spaceId,
from,
body,
reader,
memberKey
): Promise<DirectContent | null>;Defined in: packages/core/src/privacy/direct.ts:85
Opens a direct message for one of its readers.
Parameters
| Parameter | Type | Description |
|---|---|---|
spaceId | string | - |
from | string | The root of the record's first version: who wrote it |
body | unknown | - |
reader | string | The account opening it |
memberKey | { privateKey: CryptoKey; publicKey: string; } | The reader's member key pair in this space (contactKeyPair) |
memberKey.privateKey | CryptoKey | - |
memberKey.publicKey | string | - |
Returns
Promise<DirectContent | null>
The content, or null when it isn't for this reader, or anything in it doesn't open