mcp-teams 0.3.36 → 0.3.37

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.
@@ -1506,9 +1506,10 @@ async function sendMessage({ conversation, newChat, people, text, threadId, subj
1506
1506
  const r = await api("chatsvc", `/v1/users/ME/conversations/${encodeURIComponent(target)}/messages`, { method: "POST", body, onCapture: asConfirmed(account), unreadable: UNREADABLE });
1507
1507
  dropList(); // its last message changed: a list_chats right after must not show the old one
1508
1508
  const sent = { sent: true, conversation: conversation.title ?? conversation.id };
1509
- const at = r && r !== UNREADABLE && r.OriginalArrivalTime ? new Date(r.OriginalArrivalTime) : null;
1510
- if (r === UNREADABLE || (at && Number.isNaN(at.getTime()))) return { ...sent, time: null, timeNote: TIME_UNCONFIRMED };
1511
- return { ...sent, time: at ? at.toISOString() : null };
1509
+ const at = r && r !== UNREADABLE ? r.OriginalArrivalTime : null;
1510
+ const time = teams.isoTime(at);
1511
+ if (r === UNREADABLE || (at && !time)) return { ...sent, time: null, timeNote: TIME_UNCONFIRMED };
1512
+ return { ...sent, time };
1512
1513
  }
1513
1514
 
1514
1515
  // ------------------------------------------------------------ auto-send to self (autoSendTo)
@@ -2,7 +2,7 @@
2
2
  "manifest_version": 3,
3
3
  "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvoz9Wexl4ZqY9YtEyBZsu/Qi5Ft5EjNUNB8b30wgt3AR8TjXI5UumcPQFBIm7ZfvBsjgrh6tBJlygsgFbZ5cB1EiI+WSz/2Wcqwz4eowKMXXPvGuDGrO+2O2zbSpTG19/MwTljI+g0TLfn8Vkoqd8z9MskKk+vCZjjV0Jk8QjVEdHypgM7H8zTuUM06SO12IIZMdeE3IURzf35zbjlfPPkJiDWoo3wB9nxAvLd57xrQhPUB/lGtCJk9mS3SY+/VwOlG5kJ9WS/RCHXcs5Qs7huIlKIatmFz7YiducvTR3DKBbjqbMTyqHzXkmkUmJRqzsYtgtKcz0C0cjFOt6uNdhwIDAQAB",
4
4
  "name": "mcp-teams bridge",
5
- "version": "0.3.36",
5
+ "version": "0.3.37",
6
6
  "description": "Lets AI assistants (via the mcp-teams MCP server) read and search Microsoft Teams chats, channels and meeting transcripts and, with your explicit confirmation, post messages.",
7
7
  "minimum_chrome_version": "116",
8
8
  "icons": {
@@ -430,10 +430,15 @@ function jsonProp(v) {
430
430
  }
431
431
  }
432
432
 
433
- const isoTime = (v) => {
433
+ /** A time as an ISO string: all digits are epoch ms; anything that isn't a date (even one that can't be converted) is null. */
434
+ export const isoTime = (v) => {
434
435
  if (!v) return null;
435
- const d = new Date(/^\d+$/.test(String(v)) ? Number(v) : v);
436
- return Number.isNaN(d.getTime()) ? null : d.toISOString();
436
+ try {
437
+ const d = new Date(/^\d+$/.test(String(v)) ? Number(v) : v);
438
+ return Number.isNaN(d.getTime()) ? null : d.toISOString();
439
+ } catch {
440
+ return null;
441
+ }
437
442
  };
438
443
 
439
444
  /** The root message a channel reply belongs to (from ";messageid=<id>" in its conversation link). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-teams",
3
- "version": "0.3.36",
3
+ "version": "0.3.37",
4
4
  "description": "MCP server that lets AI assistants work with Microsoft Teams (web) through a Chrome/Edge extension bridge",
5
5
  "keywords": ["mcp", "model-context-protocol", "teams", "microsoft-teams", "microsoft-365", "chat", "claude", "chrome-extension"],
6
6
  "repository": {