Skip to content

Commit 231486c

Browse files
committed
updates
1 parent 1995b9f commit 231486c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

components/cloudbeds/sources/new-guest-created/new-guest-created.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default {
2121
return {
2222
id: body.guestId,
2323
summary: `New guest created with ID: ${body.guestId}`,
24-
ts: Math.floor(body.timestamp),
24+
ts: Math.floor(body.timestamp * 1000),
2525
};
2626
},
2727
},

components/cloudbeds/sources/new-reservation-created/new-reservation-created.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default {
2121
return {
2222
id: body.reservationID,
2323
summary: `New reservation created with ID: ${body.reservationID}`,
24-
ts: Math.floor(body.timestamp),
24+
ts: Math.floor(body.timestamp * 1000),
2525
};
2626
},
2727
},

components/cloudbeds/sources/reservation-status-changed/reservation-status-changed.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ export default {
3636
return "status_changed";
3737
},
3838
isRelevant(body) {
39-
return this.statuses.includes(body.status);
39+
return !this.statuses?.length || this.statuses.includes(body.status);
4040
},
4141
generateMeta(body) {
4242
return {
43-
id: body.timestamp,
43+
id: `${body.reservationID}-${body.timestamp}`,
4444
summary: `Reservation status changed to ${body.status}`,
45-
ts: Math.floor(body.timestamp),
45+
ts: Math.floor(body.timestamp * 1000),
4646
};
4747
},
4848
},

0 commit comments

Comments
 (0)