Skip to content
This repository has been archived by the owner on Jun 9, 2022. It is now read-only.

Commit

Permalink
add new message
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiebrown201 committed May 6, 2020
1 parent 69281a7 commit ebb66ec
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions data/message.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
MESSAGE: {
ending:
"\n _You can change your status throughout the day by adding and removing the relevent emoji as a reaction to this message. This does not update your status you will have to do that manually as well._"
}
"\n _You can update your status locally in this channel summary at any time by selecting the relevant reaction emoji on this message. NB, this does not modify your overall Slack status. To add this to your channel just invite the app and set a reminder mentioning it. For more information on installation or question heard to #ftlabs._",
},
};
3 changes: 3 additions & 0 deletions emojiReact.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ function addName({ text, name, message, type }) {
if (!text.includes(message)) {
console.log("on herererere");
const textSplit = text.split(MESSAGE.ending);
console.log("message", message);
console.log("text", text);

console.log("textSplit", textSplit);
finalMessage = textSplit[0] += `\n ${message} \n ${name} \n ${MESSAGE.ending}`;
} else {
Expand Down
3 changes: 2 additions & 1 deletion post.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ async function postUpdate({ text, channel, test }) {
const postingChannel = test ? test : channel;
const result = await web.chat.postMessage({
text,
channel: postingChannel
channel: postingChannel,
unfurl_links: false
});
console.log(
`Successfully send message ${result.ts} in conversation ${postingChannel}`
Expand Down

0 comments on commit ebb66ec

Please sign in to comment.