understanding glue thread types.md

Understanding Glue thread types

In Glue, everything begins with a Thread — the core container for messages, participants, and activity.
All conversations, whether a direct message, group chat, or topic-based discussion, are built on this same primitive.

Every message belongs to a Thread, and its ThreadType defines the context. These types aren’t just technical details: they also shape how the conversation appears in the app. Different types have their own interfaces, optimized for their purpose, and may even appear in separate sections so users can tell them apart at a glance.

This shared structure keeps things consistent for developers while giving the platform room to support different behaviors and evolve over time.

Thread Types

The ThreadType enum defines the different kinds of conversations supported in Glue. Each type controls how recipients are treated, how the thread behaves over time, and how it is displayed in the Glue interface.

enum ThreadType {
  thread # or named?
  chat
}

ThreadType is mutable by the system. For example, a thread may evolve into a chat if the thread is converted into a group later.


thread

A subject-based discussion designed to have a clear lifecycle.

Sample Response Payload of a Standard Thread
{
  "data": {
    "thread": {
      "id": "thr_2hTJ4DGsxUAeEhKOyJ2PMePFL0c",
      "subject": "Project: Omega Initiative",
      "threadType": "thread",
      "recipients": {
        "edges": [
          {
            "node": {
              "id": "usr_2rdDJjsN0n5HONuOusUoNcdu26X",
              "name": "Charlie Davis"
            }
          },
          {
            "node": {
              "id": "grp_2tuREOmMXCuwA9GDHhJf9CaHaaa",
              "name": "Product Team"
            }
          },
          {
            "node": {
              "id": "usr_2rdAe3Iuh2i92zy9Rq2xsWBQ59u",
              "name": "Diana Wilson"
            }
          }
        ]
      }
    }
  }
}

chat

A persistent chat for a single group or between two users ("DM").

The recipient ID of a chat cannot change, it is either the single user or the group. While the recipient ID is locked, group membership remains dynamic. For example, if a user joins or leaves the group, the chat automatically reflects the updated membership.

Sample Response Payload of a DM
{
  "data": {
    "thread": {
      "id": "thr_2PtTG7GFSgcgwfpeDOBGEQtyB24",
      "threadType": "chat",
      "recipients": {
        "edges": [
          {
            "node": {
              "id": "usr_1h3c43PfmSQpPb0CXwRJUYs0ker",
              "name": "Alice Johnson"
            }
          },
          {
            "node": {
              "id": "usr_2mHVPy5LlHYPs2zHcwm56M85J3h",
              "name": "Bob Smith"
            }
          }
        ]
      }
    }
  }
}
Sample Response Payload of a Group Chat
{
  "data": {
    "thread": {
      "id": "thr_2rdAeYdtPPUOMQx5MgeeUkw9Yar",
      "threadType": "chat",
      "recipients": {
        "edges": [
          {
            "node": {
              "id": "grp_2hSyORgf8VqMLg0ADIvTi9oY6Nk",
              "name": "Engineering Team",
              "description": "Core engineering team discussions"
            }
          }
        ]
      }
    }
  }
}