Zoom integration #53
@ -11,8 +11,7 @@ module.exports = async function(robot, kredits) {
|
||||
|
||||
const walletTransactionCount = await kredits.provider.getTransactionCount(kredits.signer.address);
|
||||
let nonce = walletTransactionCount;
|
||||
|
||||
function createContributionFor(participant, meeting) {
|
||||
![]()
```suggestion
const { Contributor, Contribution } = kredits;
```
![]()
```suggestion
const contribution = {
```
![]() This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call". This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call".
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Ignoring zoom call ${data.uuid} (duration: ${meetingDetails.duration}, participants_count: ${meetingDetails.participants_count})`);
```
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Contribution created: ${tx.hash}`);
```
![]()
```suggestion
robot.router.post('/incoming/kredits/zoom/'+process.env.KREDITS_WEBHOOK_TOKEN, (req, res) => {
```
|
||||
const displayName = participant.name;
|
||||
![]()
```suggestion
const { Contributor, Contribution } = kredits;
```
![]()
```suggestion
const contribution = {
```
![]() This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call". This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call".
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Ignoring zoom call ${data.uuid} (duration: ${meetingDetails.duration}, participants_count: ${meetingDetails.participants_count})`);
```
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Contribution created: ${tx.hash}`);
```
![]()
```suggestion
robot.router.post('/incoming/kredits/zoom/'+process.env.KREDITS_WEBHOOK_TOKEN, (req, res) => {
```
|
||||
function createContributionFor(displayName, meeting) {
|
||||
![]()
```suggestion
const { Contributor, Contribution } = kredits;
```
![]()
```suggestion
const contribution = {
```
![]() This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call". This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call".
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Ignoring zoom call ${data.uuid} (duration: ${meetingDetails.duration}, participants_count: ${meetingDetails.participants_count})`);
```
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Contribution created: ${tx.hash}`);
```
![]()
```suggestion
robot.router.post('/incoming/kredits/zoom/'+process.env.KREDITS_WEBHOOK_TOKEN, (req, res) => {
```
|
||||
|
||||
return getContributorByZoomDisplayName(displayName)
|
||||
.then(contributor => {
|
||||
@ -21,7 +20,7 @@ module.exports = async function(robot, kredits) {
|
||||
![]()
```suggestion
const { Contributor, Contribution } = kredits;
```
![]()
```suggestion
const { Contributor, Contribution } = kredits;
```
![]()
```suggestion
const contribution = {
```
![]()
```suggestion
const contribution = {
```
![]() This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call". This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call".
![]() This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call". This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call".
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Ignoring zoom call ${data.uuid} (duration: ${meetingDetails.duration}, participants_count: ${meetingDetails.participants_count})`);
```
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Ignoring zoom call ${data.uuid} (duration: ${meetingDetails.duration}, participants_count: ${meetingDetails.participants_count})`);
```
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Contribution created: ${tx.hash}`);
```
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Contribution created: ${tx.hash}`);
```
![]()
```suggestion
robot.router.post('/incoming/kredits/zoom/'+process.env.KREDITS_WEBHOOK_TOKEN, (req, res) => {
```
![]()
```suggestion
robot.router.post('/incoming/kredits/zoom/'+process.env.KREDITS_WEBHOOK_TOKEN, (req, res) => {
```
|
||||
contributorIpfsHash: contributor.ipfsHash,
|
||||
amount: kreditsContributionAmount,
|
||||
kind: kreditsContributionKind,
|
||||
description: `Team meeting: ${meeting.topic}`,
|
||||
![]()
```suggestion
const { Contributor, Contribution } = kredits;
```
![]()
```suggestion
const contribution = {
```
![]() This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call". This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call".
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Ignoring zoom call ${data.uuid} (duration: ${meetingDetails.duration}, participants_count: ${meetingDetails.participants_count})`);
```
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Contribution created: ${tx.hash}`);
```
![]()
```suggestion
robot.router.post('/incoming/kredits/zoom/'+process.env.KREDITS_WEBHOOK_TOKEN, (req, res) => {
```
|
||||
description: 'Team/Community Call',
|
||||
![]()
```suggestion
const { Contributor, Contribution } = kredits;
```
![]()
```suggestion
const contribution = {
```
![]() This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call". This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call".
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Ignoring zoom call ${data.uuid} (duration: ${meetingDetails.duration}, participants_count: ${meetingDetails.participants_count})`);
```
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Contribution created: ${tx.hash}`);
```
![]()
```suggestion
robot.router.post('/incoming/kredits/zoom/'+process.env.KREDITS_WEBHOOK_TOKEN, (req, res) => {
```
|
||||
date: meeting.end_time.split('T')[0],
|
||||
time: meeting.end_time.split('T')[1]
|
||||
}
|
||||
@ -63,12 +62,13 @@ module.exports = async function(robot, kredits) {
|
||||
![]()
```suggestion
const { Contributor, Contribution } = kredits;
```
![]()
```suggestion
const { Contributor, Contribution } = kredits;
```
![]()
```suggestion
const contribution = {
```
![]()
```suggestion
const contribution = {
```
![]() This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call". This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call".
![]() This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call". This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call".
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Ignoring zoom call ${data.uuid} (duration: ${meetingDetails.duration}, participants_count: ${meetingDetails.participants_count})`);
```
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Ignoring zoom call ${data.uuid} (duration: ${meetingDetails.duration}, participants_count: ${meetingDetails.participants_count})`);
```
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Contribution created: ${tx.hash}`);
```
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Contribution created: ${tx.hash}`);
```
![]()
```suggestion
robot.router.post('/incoming/kredits/zoom/'+process.env.KREDITS_WEBHOOK_TOKEN, (req, res) => {
```
![]()
```suggestion
robot.router.post('/incoming/kredits/zoom/'+process.env.KREDITS_WEBHOOK_TOKEN, (req, res) => {
```
|
||||
robot.logger.info(`[hubot-kredits] Ignoring zoom call ${data.uuid} (duration: ${meetingDetails.duration}, participants_count: ${meetingDetails.participants_count})`);
|
||||
return;
|
||||
}
|
||||
participants.forEach(p => {
|
||||
![]()
```suggestion
const { Contributor, Contribution } = kredits;
```
![]()
```suggestion
const contribution = {
```
![]() This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call". This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call".
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Ignoring zoom call ${data.uuid} (duration: ${meetingDetails.duration}, participants_count: ${meetingDetails.participants_count})`);
```
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Contribution created: ${tx.hash}`);
```
![]()
```suggestion
robot.router.post('/incoming/kredits/zoom/'+process.env.KREDITS_WEBHOOK_TOKEN, (req, res) => {
```
|
||||
createContributionFor(p, meetingDetails)
|
||||
![]()
```suggestion
const { Contributor, Contribution } = kredits;
```
![]()
```suggestion
const contribution = {
```
![]() This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call". This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call".
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Ignoring zoom call ${data.uuid} (duration: ${meetingDetails.duration}, participants_count: ${meetingDetails.participants_count})`);
```
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Contribution created: ${tx.hash}`);
```
![]()
```suggestion
robot.router.post('/incoming/kredits/zoom/'+process.env.KREDITS_WEBHOOK_TOKEN, (req, res) => {
```
|
||||
const names = Array.from(new Set(participants.map(p => p.name)));
|
||||
![]()
```suggestion
const { Contributor, Contribution } = kredits;
```
![]()
```suggestion
const contribution = {
```
![]() This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call". This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call".
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Ignoring zoom call ${data.uuid} (duration: ${meetingDetails.duration}, participants_count: ${meetingDetails.participants_count})`);
```
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Contribution created: ${tx.hash}`);
```
![]()
```suggestion
robot.router.post('/incoming/kredits/zoom/'+process.env.KREDITS_WEBHOOK_TOKEN, (req, res) => {
```
|
||||
for(const displayName of names) {
|
||||
![]()
```suggestion
const { Contributor, Contribution } = kredits;
```
![]()
```suggestion
const contribution = {
```
![]() This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call". This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call".
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Ignoring zoom call ${data.uuid} (duration: ${meetingDetails.duration}, participants_count: ${meetingDetails.participants_count})`);
```
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Contribution created: ${tx.hash}`);
```
![]()
```suggestion
robot.router.post('/incoming/kredits/zoom/'+process.env.KREDITS_WEBHOOK_TOKEN, (req, res) => {
```
|
||||
await createContributionFor(displayName, meetingDetails)
|
||||
![]()
```suggestion
const { Contributor, Contribution } = kredits;
```
![]()
```suggestion
const contribution = {
```
![]() This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call". This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call".
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Ignoring zoom call ${data.uuid} (duration: ${meetingDetails.duration}, participants_count: ${meetingDetails.participants_count})`);
```
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Contribution created: ${tx.hash}`);
```
![]()
```suggestion
robot.router.post('/incoming/kredits/zoom/'+process.env.KREDITS_WEBHOOK_TOKEN, (req, res) => {
```
|
||||
.then(tx => {
|
||||
robot.logger.info(`[hubot-kredits] Contribution created: ${tx.hash}`);
|
||||
})
|
||||
![]()
```suggestion
const { Contributor, Contribution } = kredits;
```
![]()
```suggestion
const contribution = {
```
![]() This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call". This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call".
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Ignoring zoom call ${data.uuid} (duration: ${meetingDetails.duration}, participants_count: ${meetingDetails.participants_count})`);
```
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Contribution created: ${tx.hash}`);
```
![]()
```suggestion
robot.router.post('/incoming/kredits/zoom/'+process.env.KREDITS_WEBHOOK_TOKEN, (req, res) => {
```
|
||||
});
|
||||
![]()
```suggestion
const { Contributor, Contribution } = kredits;
```
![]()
```suggestion
const contribution = {
```
![]() This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call". This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call".
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Ignoring zoom call ${data.uuid} (duration: ${meetingDetails.duration}, participants_count: ${meetingDetails.participants_count})`);
```
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Contribution created: ${tx.hash}`);
```
![]()
```suggestion
robot.router.post('/incoming/kredits/zoom/'+process.env.KREDITS_WEBHOOK_TOKEN, (req, res) => {
```
|
||||
});
|
||||
![]()
```suggestion
const { Contributor, Contribution } = kredits;
```
![]()
```suggestion
const contribution = {
```
![]() This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call". This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call".
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Ignoring zoom call ${data.uuid} (duration: ${meetingDetails.duration}, participants_count: ${meetingDetails.participants_count})`);
```
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Contribution created: ${tx.hash}`);
```
![]()
```suggestion
robot.router.post('/incoming/kredits/zoom/'+process.env.KREDITS_WEBHOOK_TOKEN, (req, res) => {
```
|
||||
};
|
||||
![]()
```suggestion
const { Contributor, Contribution } = kredits;
```
![]()
```suggestion
const contribution = {
```
![]() This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call". This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call".
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Ignoring zoom call ${data.uuid} (duration: ${meetingDetails.duration}, participants_count: ${meetingDetails.participants_count})`);
```
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Contribution created: ${tx.hash}`);
```
![]()
```suggestion
robot.router.post('/incoming/kredits/zoom/'+process.env.KREDITS_WEBHOOK_TOKEN, (req, res) => {
```
|
||||
}
|
||||
|
||||
robot.router.post('/incoming/kredits/zoom/'+process.env.KREDITS_WEBHOOK_TOKEN, (req, res) => {
|
||||
|
||||
![]()
```suggestion
const { Contributor, Contribution } = kredits;
```
![]()
```suggestion
const { Contributor, Contribution } = kredits;
```
![]()
```suggestion
const contribution = {
```
![]()
```suggestion
const contribution = {
```
![]() This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call". This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call".
![]() This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call". This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call".
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Ignoring zoom call ${data.uuid} (duration: ${meetingDetails.duration}, participants_count: ${meetingDetails.participants_count})`);
```
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Ignoring zoom call ${data.uuid} (duration: ${meetingDetails.duration}, participants_count: ${meetingDetails.participants_count})`);
```
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Contribution created: ${tx.hash}`);
```
![]()
```suggestion
robot.logger.info(`[hubot-kredits] Contribution created: ${tx.hash}`);
```
![]()
```suggestion
robot.router.post('/incoming/kredits/zoom/'+process.env.KREDITS_WEBHOOK_TOKEN, (req, res) => {
```
![]()
```suggestion
robot.router.post('/incoming/kredits/zoom/'+process.env.KREDITS_WEBHOOK_TOKEN, (req, res) => {
```
|
This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call".
This is a bit of an issue, because we sometimes use the Weekly Call room for other meetings. Not sure what the best solution is. Maybe just something generic like "Team/Community Call".