@sentry/junior 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@ import {
4
4
  createNormalizingStream,
5
5
  resetBotDepsForTests,
6
6
  setBotDepsForTests
7
- } from "./chunk-JRKU55W5.js";
7
+ } from "./chunk-OGLG4WAL.js";
8
8
  import "./chunk-KT5HARSN.js";
9
9
  import "./chunk-RKOO42TW.js";
10
10
  import "./chunk-Z5E25LRN.js";
@@ -4,7 +4,7 @@ import {
4
4
  downloadPrivateSlackFile,
5
5
  getThreadMessageTopic,
6
6
  removeReactionFromMessage
7
- } from "./chunk-JRKU55W5.js";
7
+ } from "./chunk-OGLG4WAL.js";
8
8
  import {
9
9
  acquireQueueMessageProcessingOwnership,
10
10
  completeQueueMessageProcessingOwnership,
@@ -12,7 +12,7 @@ import {
12
12
  import { after } from "next/server";
13
13
  import * as Sentry from "@sentry/nextjs";
14
14
  async function loadBot() {
15
- const { bot } = await import("./bot-ZKMCCT3D.js");
15
+ const { bot } = await import("./bot-7SE3TX37.js");
16
16
  return bot;
17
17
  }
18
18
  async function POST(request, context) {
@@ -7643,7 +7643,14 @@ function normalizeIncomingSlackThreadId(threadId, message) {
7643
7643
  function buildQueueIngressDedupKey(normalizedThreadId, messageId) {
7644
7644
  return `${normalizedThreadId}:${messageId}`;
7645
7645
  }
7646
+ function isSlackDirectMessageThreadId(threadId) {
7647
+ const parts = threadId.split(":");
7648
+ return parts.length === 3 && parts[0] === "slack" && parts[1]?.startsWith("D");
7649
+ }
7646
7650
  function determineThreadMessageKind(args) {
7651
+ if (args.isDirectMessage) {
7652
+ return "new_mention";
7653
+ }
7647
7654
  if (args.isSubscribed) {
7648
7655
  return "subscribed_message";
7649
7656
  }
@@ -7768,7 +7775,12 @@ async function routeIncomingMessageToQueue(args) {
7768
7775
  const isSubscribed = await deps.getIsSubscribed(normalizedThreadId);
7769
7776
  const mentionSource = typedMessage.isMention ? "sdk_flag" : runtime.detectMention?.(adapter, message) ? "fallback_detector" : void 0;
7770
7777
  const isMention = mentionSource !== void 0;
7778
+ if (isMention && !typedMessage.isMention) {
7779
+ typedMessage.isMention = true;
7780
+ }
7781
+ const isDirectMessage = isSlackDirectMessageThreadId(normalizedThreadId);
7771
7782
  const kind = determineThreadMessageKind({
7783
+ isDirectMessage,
7772
7784
  isSubscribed,
7773
7785
  isMention
7774
7786
  });
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  POST
3
- } from "../chunk-56WI5Q7P.js";
4
- import "../chunk-JRKU55W5.js";
3
+ } from "../chunk-H3ZG43WE.js";
4
+ import "../chunk-OGLG4WAL.js";
5
5
  import "../chunk-KT5HARSN.js";
6
6
  import "../chunk-RKOO42TW.js";
7
7
  import "../chunk-Z5E25LRN.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  POST as POST2
3
- } from "../chunk-QHKQ2AWX.js";
3
+ } from "../chunk-NNYZHUWR.js";
4
4
  import {
5
5
  POST
6
- } from "../chunk-56WI5Q7P.js";
6
+ } from "../chunk-H3ZG43WE.js";
7
7
  import {
8
8
  escapeXml,
9
9
  formatProviderLabel,
@@ -13,7 +13,7 @@ import {
13
13
  publishAppHomeView,
14
14
  resolveBaseUrl,
15
15
  truncateStatusText
16
- } from "../chunk-JRKU55W5.js";
16
+ } from "../chunk-OGLG4WAL.js";
17
17
  import {
18
18
  GET
19
19
  } from "../chunk-4RBEYCOG.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  POST
3
- } from "../chunk-QHKQ2AWX.js";
3
+ } from "../chunk-NNYZHUWR.js";
4
4
  import "../chunk-PY4AI2GZ.js";
5
5
  export {
6
6
  POST
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/junior",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -53,7 +53,7 @@
53
53
  "@types/react": "^19.2.14",
54
54
  "@types/react-dom": "^19.2.3",
55
55
  "msw": "^2.12.10",
56
- "next": "^16.1.6",
56
+ "next": "^16.1.7",
57
57
  "react": "^19.2.4",
58
58
  "react-dom": "^19.2.4",
59
59
  "tsup": "^8.5.1",