Skip to content

Commit 962ab66

Browse files
committed
updates
1 parent 8e5b65d commit 962ab66

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

components/google_drive/sources/changes-to-files-in-drive/changes-to-files-in-drive.mjs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default {
1212
...common,
1313
key: "google_drive-changes-to-files-in-drive",
1414
name: "Changes to Files in Drive",
15-
description: "Watches for changes to specific files in the user's drive, emitting an event when a change is made to one of those files. [See the documentation](https://developers.google.com/drive/api/v3/reference/changes/watch)",
15+
description: "Emit new event when a change is made to one of the specified files. [See the documentation](https://developers.google.com/drive/api/v3/reference/changes/watch)",
1616
version: "0.0.1",
1717
type: "source",
1818
dedupe: "unique",
@@ -122,11 +122,12 @@ export default {
122122
if (this.includeLink) {
123123
file.file = await stashFile(file, this.googleDrive, this.dir);
124124
}
125+
const fileInfo = await this.googleDrive.getFile(file.id);
125126
const eventToEmit = {
126-
file,
127+
file: fileInfo,
127128
...changes,
128129
};
129-
const meta = this.generateMeta(file, headers);
130+
const meta = this.generateMeta(fileInfo, headers);
130131
this.$emit(eventToEmit, meta);
131132
},
132133
async processChanges(changedFiles, headers) {

components/google_drive/sources/changes-to-specific-files-shared-drive/changes-to-specific-files-shared-drive.mjs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default {
2828
key: "google_drive-changes-to-specific-files-shared-drive",
2929
name: "Changes to Specific Files (Shared Drive)",
3030
description: "Watches for changes to specific files in a shared drive, emitting an event when a change is made to one of those files",
31-
version: "0.3.0",
31+
version: "0.3.1",
3232
type: "source",
3333
// Dedupe events based on the "x-goog-message-number" header for the target channel:
3434
// https://developers.google.com/drive/api/v3/push#making-watch-requests
@@ -127,11 +127,12 @@ export default {
127127
if (this.includeLink) {
128128
file.file = await stashFile(file, this.googleDrive, this.dir);
129129
}
130+
const fileInfo = await this.googleDrive.getFile(file.id);
130131
const eventToEmit = {
131-
file,
132+
file: fileInfo,
132133
...changes,
133134
};
134-
const meta = this.generateMeta(file, headers);
135+
const meta = this.generateMeta(fileInfo, headers);
135136
this.$emit(eventToEmit, meta);
136137
},
137138
async processChanges(changedFiles, headers) {

0 commit comments

Comments
 (0)