# app.userinput.lock

> Published by [userinput.app](https://lexicon.garden/identity/did:plc:uyixj57k6nmxrdj7pjs2ss5s)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:uyixj57k6nmxrdj7pjs2ss5s/app.userinput.lock)
- [Documentation](https://lexicon.garden/lexicon/did:plc:uyixj57k6nmxrdj7pjs2ss5s/app.userinput.lock/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:uyixj57k6nmxrdj7pjs2ss5s/app.userinput.lock/examples)

## Definitions

### `app.userinput.lock`

**Type**: `record`

A moderation lock on a discussion: replies created after lockedAt are no longer shown, and the thread is closed to new replies. Only honored when authored by the space owner or an appointed moderator. Latest createdAt wins; deleting the record unlocks (for that moderator). Lives in the moderator's repo.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `subject` | `ref` → `com.atproto.repo.strongRef` | Yes | The discussion being locked. Indexed by constellation at subject.uri. |
| `lockedAt` | `string` (datetime) | Yes | Cutoff time: replies with createdAt at or before this are shown; later ones are hidden. |
| `createdAt` | `string` (datetime) | Yes |  |

## Raw Schema

```json
{
  "id": "app.userinput.lock",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "subject",
          "lockedAt",
          "createdAt"
        ],
        "properties": {
          "subject": {
            "ref": "com.atproto.repo.strongRef",
            "type": "ref",
            "description": "The discussion being locked. Indexed by constellation at subject.uri."
          },
          "lockedAt": {
            "type": "string",
            "format": "datetime",
            "description": "Cutoff time: replies with createdAt at or before this are shown; later ones are hidden."
          },
          "createdAt": {
            "type": "string",
            "format": "datetime"
          }
        }
      },
      "description": "A moderation lock on a discussion: replies created after lockedAt are no longer shown, and the thread is closed to new replies. Only honored when authored by the space owner or an appointed moderator. Latest createdAt wins; deleting the record unlocks (for that moderator). Lives in the moderator's repo."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
