# chat.yakka.resolveMessage

> Published by [yakka.chat](https://lexicon.garden/identity/did:plc:wpjoy2orkqq5m65vq7gg7liz)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:wpjoy2orkqq5m65vq7gg7liz/chat.yakka.resolveMessage)
- [Documentation](https://lexicon.garden/lexicon/did:plc:wpjoy2orkqq5m65vq7gg7liz/chat.yakka.resolveMessage/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:wpjoy2orkqq5m65vq7gg7liz/chat.yakka.resolveMessage/examples)

## Definitions

### `chat.yakka.resolveMessage`

**Type**: `query`

Resolve a permalink fragment's message ref within a channel.

`ambiguous` is the case the explicit fragment form exists to avoid: two authors can in principle mint the same TID in one channel. Rare at any single channel's scale, not impossible across many — so it is a case, not an assumption.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `tid` | `string` | Yes |  |
| `author` | `string` (did) | No | Disambiguates when two authors minted the same TID in this channel. |
| `channel` | `string` | Yes |  |

#### Output

**Encoding**: `application/json`

### `chat.yakka.resolveMessage#output`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `seq` | `integer` | No | A deleted message keeps its sequence so the timeline can still scroll to it (ADR 0010). |
| `kind` | `string` | Yes |  |
| `message` | `ref` → `chat.yakka.defs#messageView` | No |  |
| `candidates` | `array` | No |  |

## Raw Schema

```json
{
  "id": "chat.yakka.resolveMessage",
  "defs": {
    "main": {
      "type": "query",
      "output": {
        "schema": {
          "ref": "#output",
          "type": "ref"
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "required": [
          "channel",
          "tid"
        ],
        "properties": {
          "tid": {
            "type": "string"
          },
          "author": {
            "type": "string",
            "format": "did",
            "description": "Disambiguates when two authors minted the same TID in this channel."
          },
          "channel": {
            "type": "string"
          }
        }
      },
      "description": "Resolve a permalink fragment's message ref within a channel.\n\n`ambiguous` is the case the explicit fragment form exists to avoid: two authors can in principle mint the same TID in one channel. Rare at any single channel's scale, not impossible across many — so it is a case, not an assumption."
    },
    "output": {
      "type": "object",
      "required": [
        "kind"
      ],
      "properties": {
        "seq": {
          "type": "integer",
          "description": "A deleted message keeps its sequence so the timeline can still scroll to it (ADR 0010)."
        },
        "kind": {
          "type": "string",
          "knownValues": [
            "ok",
            "ambiguous",
            "gone",
            "notFound"
          ]
        },
        "message": {
          "ref": "chat.yakka.defs#messageView",
          "type": "ref"
        },
        "candidates": {
          "type": "array",
          "items": {
            "ref": "chat.yakka.defs#messageView",
            "type": "ref"
          }
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
