Improve room messages a bit
And don't notify everyone for every contribution.
This commit is contained in:
parent
f4b484ed5a
commit
2be3d4e8e3
15
index.js
15
index.js
@ -77,7 +77,7 @@ module.exports = async function(robot) {
|
|||||||
let description = res.match[3];
|
let description = res.match[3];
|
||||||
let url = null;
|
let url = null;
|
||||||
createProposal(githubUser, amount, description, url).then((result) => {
|
createProposal(githubUser, amount, description, url).then((result) => {
|
||||||
messageRoom('Sounds good! will be listed on http://kredits.kosmos.org in a bit');
|
messageRoom('Sounds good! Will be listed on https://kredits.kosmos.org in a bit...');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -90,7 +90,7 @@ module.exports = async function(robot) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
messageRoom('http://kredits.kosmos.org');
|
messageRoom('https://kredits.kosmos.org');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -260,15 +260,8 @@ 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) => {
|
||||||
let message = `Let's give ${contributor.name} some Kredits for`;
|
console.debug('Proposal created:', proposal);
|
||||||
if (proposal.url) {
|
// messageRoom(`Let's give ${contributor.name} some kredits for ${proposal.url} (${proposal.description}): https://kredits.kosmos.org`);
|
||||||
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