minca
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

ParameterTypeDescription
spaceIdstring-
fromstringThe root of the record's first version: who wrote it
bodyunknown-
readerstringThe account opening it
memberKey{ privateKey: CryptoKey; publicKey: string; }The reader's member key pair in this space (contactKeyPair)
memberKey.privateKeyCryptoKey-
memberKey.publicKeystring-

Returns

Promise<DirectContent | null>

The content, or null when it isn't for this reader, or anything in it doesn't open

On this page