Better message for new proposal notifications
This commit is contained in:
parent
3fe6dfb2ce
commit
e4fb97c0c9
10
index.js
10
index.js
@ -260,7 +260,15 @@ module.exports = async function(robot) {
|
|||||||
function handleProposalCreated(proposalId, creatorAccount, contributorId, amount) {
|
function handleProposalCreated(proposalId, creatorAccount, contributorId, amount) {
|
||||||
Contributor.getById(contributorId).then((contributor) => {
|
Contributor.getById(contributorId).then((contributor) => {
|
||||||
Operator.getById(proposalId).then((proposal) => {
|
Operator.getById(proposalId).then((proposal) => {
|
||||||
messageRoom(`Let's give ${contributor.name} some kredits for ${proposal.url} (${proposal.description}): https://kredits.kosmos.org`);
|
let message = `Let's give ${contributor.name} some Kredits for`;
|
||||||
|
if (proposal.url) {
|
||||||
|
message += ` ${proposal.url}`;
|
||||||
|
}
|
||||||
|
if (proposal.description) {
|
||||||
|
message += ` ${proposal.description}`;
|
||||||
|
}
|
||||||
|
message += ' https://kredits.kosmos.org';
|
||||||
|
messageRoom(message);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user