{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A 1:1 DM conversation.",
      "key": "tid",
      "record": {
        "properties": {
          "authorDid": {
            "format": "did",
            "type": "string"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "lastMessageAt": {
            "format": "datetime",
            "type": "string"
          },
          "lastMessageDid": {
            "format": "did",
            "type": "string"
          },
          "lastMessagePreview": {
            "maxLength": 200,
            "type": "string"
          },
          "participantDids": {
            "items": {
              "format": "did",
              "type": "string"
            },
            "maxLength": 2,
            "minLength": 2,
            "type": "array"
          },
          "recipientAvatar": {
            "format": "uri",
            "type": "string"
          },
          "recipientDid": {
            "format": "did",
            "type": "string"
          },
          "recipientHandle": {
            "type": "string"
          },
          "recipientName": {
            "type": "string"
          }
        },
        "required": [
          "recipientDid",
          "participantDids",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "description": "A 1:1 direct-message conversation between two collectors, mirrored to AT Protocol as a real org.swappulse.conversation record. The creator is tracked by authorDid; the other participant by recipientDid so both can read.",
  "id": "org.swappulse.conversation",
  "lexicon": 1,
  "revision": 1
}
