惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

美团技术团队
阮一峰的网络日志
阮一峰的网络日志
T
The Blog of Author Tim Ferriss
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
宝玉的分享
宝玉的分享
L
LangChain Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Last Week in AI
Last Week in AI
博客园 - 司徒正美
M
MIT News - Artificial intelligence
人人都是产品经理
人人都是产品经理
WordPress大学
WordPress大学
B
Blog RSS Feed
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - Franky
B
Blog
V
V2EX
J
Java Code Geeks
D
Docker
博客园 - 叶小钗
The Cloudflare Blog
量子位
博客园_首页
MongoDB | Blog
MongoDB | Blog

Chat SDK Documentation

History | Chat SDK History | Chat SDK List a vendor-official adapter | Chat SDK Approvals | Chat SDK Vercel Connect | Chat SDK Teams Low-Level APIs | Chat SDK CLI | Chat SDK Platform Adapters | Chat SDK State Adapters | Chat SDK Cards | Chat SDK Getting Started | Chat SDK Introduction | Chat SDK Modals | Chat SDK Slack Low-Level APIs | Chat SDK Streaming | Chat SDK Testing | Chat SDK Overview | Chat SDK toAiMessages | Chat SDK Cards | Chat SDK Overview | Chat SDK Markdown | Chat SDK Modals | Chat SDK AI SDK Tools | Chat SDK Types | Chat SDK Conversation History | Chat SDK Transcripts | Chat SDK Slack bot with Next.js and Redis Actions | Chat SDK Direct Messages | Chat SDK Emoji | Chat SDK
Message Subject | Chat SDK
Vercel · 2026-05-08 · via Chat SDK Documentation

Fetch the parent resource that a message is about.

When your bot receives a comment on a Linear issue or GitHub PR, message.subject resolves the parent resource so your handler knows what the conversation is about.

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 and GitHub, comment webhooks deliver the comment text but not the parent issue or pull request — 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

Platformmessage.subject returns
LinearParent issue (from comment webhooks)
GitHubParent issue or PR (from comment webhooks)

All other platforms return null.

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.