Message Subject
Fetch the parent resource that a message is about.
When your bot receives a comment on a Linear issue, GitHub PR, or Notion page, message.subject resolves the parent resource so your handler knows what the conversation is about.
Usage
bot.onNewMention(async (thread, message) => {
const subject = await message.subject;
if (subject) {
await thread.post(
`This is about: ${subject.title} (${subject.status})\n${subject.url}`
);
}
});On Linear, GitHub, and Notion, comment webhooks deliver the comment text but not the full parent resource — message.subject fetches it from the platform API on first access. The result is cached on the message instance. On chat platforms (which have no parent-resource concept), or if the API call fails, it returns null.
See MessageSubject for the full type shape.
Platform support
| Platform | message.subject returns |
|---|---|
| Linear | Parent issue (from comment webhooks) |
| GitHub | Parent issue or PR (from comment webhooks) |
| Notion | Parent page (from comment webhooks) |
All other platforms return null.
User info
For user profile details, use bot.getUser:
bot.onNewMention(async (thread, message) => {
const user = await bot.getUser(message.author);
if (user) {
await thread.post(`Hi ${user.fullName} (${user.email})`);
}
});For anything beyond message.subject, access the platform's typed API client via bot.getAdapter("github").octokit or bot.getAdapter("linear").linearClient.
Read more
Conversation History
Persist messages per user across every platform — for LLM context, audit, or compliance.
Handling Events
Register handlers for mentions, messages, reactions, member joins, and platform-specific events.
Overlapping Messages
Control how overlapping messages on the same thread are handled - burst, queue, debounce, drop, or process concurrently.
Streaming
Stream real-time text responses from AI models and other async sources to chat platforms.