Skip to content

Commit

Permalink
fix: corr icon path and response status
Browse files Browse the repository at this point in the history
  • Loading branch information
Skitionek committed Apr 24, 2020
1 parent a3e3e14 commit 564d288
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,7 @@ const statuses = [
color: '#2cbe4e',
activityTitle: "Success!",
activitySubtitle: head_commit.timestamp,
activityImage: "https://raw.githubusercontent.com/Skitionek/notify-microsoft-teams/blob/master/icons/success.png"
activityImage: "https://raw.githubusercontent.com/Skitionek/notify-microsoft-teams/master/icons/success.png"

},
{
Expand All @@ -1096,23 +1096,23 @@ const statuses = [
color: '#ffc107',
activityTitle: "Cancelled",
activitySubtitle: head_commit.timestamp,
activityImage: "https://raw.githubusercontent.com/Skitionek/notify-microsoft-teams/blob/master/icons/cancelled.png"
activityImage: "https://raw.githubusercontent.com/Skitionek/notify-microsoft-teams/master/icons/cancelled.png"
},
{
id: 'skipped',
icon: '⤼',
color: '#1a6aff',
activityTitle: "Skipped",
activitySubtitle: head_commit.timestamp,
activityImage: "https://raw.githubusercontent.com/Skitionek/notify-microsoft-teams/blob/master/icons/skipped.png"
activityImage: "https://raw.githubusercontent.com/Skitionek/notify-microsoft-teams/master/icons/skipped.png"
},
{
id: 'unknown',
icon: '?',
color: '#999',
activityTitle: 'No job context has been provided',
activitySubtitle: head_commit.timestamp,
activityImage: "https://raw.githubusercontent.com/Skitionek/notify-microsoft-teams/blob/master/icons/unknown.png"
activityImage: "https://raw.githubusercontent.com/Skitionek/notify-microsoft-teams/master/icons/unknown.png"
}
];

Expand Down Expand Up @@ -1249,7 +1249,7 @@ class MSTeams {
const client = new IncomingWebhook(url);
const response = await client.send(payload);

if (response.text !== 'ok') {
if (response.text !== '1') {
throw new Error(
"Failed to send notification to Microsoft Teams.\n" +
"Response:\n" +
Expand Down
10 changes: 5 additions & 5 deletions src/MSTeams.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const statuses = [
color: '#2cbe4e',
activityTitle: "Success!",
activitySubtitle: head_commit.timestamp,
activityImage: "https://raw.githubusercontent.com/Skitionek/notify-microsoft-teams/blob/master/icons/success.png"
activityImage: "https://raw.githubusercontent.com/Skitionek/notify-microsoft-teams/master/icons/success.png"

},
{
Expand All @@ -48,23 +48,23 @@ const statuses = [
color: '#ffc107',
activityTitle: "Cancelled",
activitySubtitle: head_commit.timestamp,
activityImage: "https://raw.githubusercontent.com/Skitionek/notify-microsoft-teams/blob/master/icons/cancelled.png"
activityImage: "https://raw.githubusercontent.com/Skitionek/notify-microsoft-teams/master/icons/cancelled.png"
},
{
id: 'skipped',
icon: '⤼',
color: '#1a6aff',
activityTitle: "Skipped",
activitySubtitle: head_commit.timestamp,
activityImage: "https://raw.githubusercontent.com/Skitionek/notify-microsoft-teams/blob/master/icons/skipped.png"
activityImage: "https://raw.githubusercontent.com/Skitionek/notify-microsoft-teams/master/icons/skipped.png"
},
{
id: 'unknown',
icon: '?',
color: '#999',
activityTitle: 'No job context has been provided',
activitySubtitle: head_commit.timestamp,
activityImage: "https://raw.githubusercontent.com/Skitionek/notify-microsoft-teams/blob/master/icons/unknown.png"
activityImage: "https://raw.githubusercontent.com/Skitionek/notify-microsoft-teams/master/icons/unknown.png"
}
];

Expand Down Expand Up @@ -201,7 +201,7 @@ class MSTeams {
const client = new IncomingWebhook(url);
const response = await client.send(payload);

if (response.text !== 'ok') {
if (response.text !== '1') {
throw new Error(
"Failed to send notification to Microsoft Teams.\n" +
"Response:\n" +
Expand Down

0 comments on commit 564d288

Please sign in to comment.