# Function: openDirect()

```ts
function openDirect(
   spaceId, 
   from, 
   body, 
   reader, 
   memberKey
): Promise<DirectContent | null>;
```

Defined in: [packages/core/src/privacy/direct.ts:85](https://github.com/leifriksheim/minca/blob/main/core/src/privacy/direct.ts#L85)

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`](https://minca.dev/api/core/interfaces/DirectContent.md) \| `null`\>

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