Skip to content

Commit 956877a

Browse files
committed
always upload description
1 parent fe55d65 commit 956877a

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

packages/core/src/teams.ts

+2-9
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export function convertMarkdownToTeamsHTML(markdown: string) {
1717
let subject: string
1818
let html =
1919
"<div>" +
20-
markdown
20+
(markdown || "")
2121
.replace(/^# (.*$)/gim, (m, t) => {
2222
subject = t
2323
return ""
@@ -120,14 +120,7 @@ async function microsoftTeamsChannelUploadFile(
120120
const j = (await res.json()) as MicrosoftTeamsEntity
121121
logVerbose(`teams: uploaded ${filename} to ${j.webUrl}`)
122122

123-
if (description) {
124-
const resg = await fetch(itemUrl, {
125-
method: "GET",
126-
headers: {
127-
Authorization,
128-
"Content-Type": "application/json",
129-
},
130-
})
123+
if (disclaimer || description) {
131124
const html = convertMarkdownToTeamsHTML(description)
132125
if (disclaimer) html.content += disclaimer
133126

0 commit comments

Comments
 (0)