Skip to content

Commit 4aabaae

Browse files
committed
Fixes
1 parent 42b1dba commit 4aabaae

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

components/gmail_custom_oauth/gmail_custom_oauth.app.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@ export default {
103103
return this.getMessagesWithRetry([
104104
id,
105105
], retryCount + 1);
106-
} else {
107-
console.error("Failed after 3 attempts.");
108-
return null; // or return a default value
109106
}
107+
108+
console.error("Failed after 3 attempts.");
109+
return null;
110110
}));
111111
return Promise.all(promises);
112112
},

components/gmail_custom_oauth/sources/common/polling.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,21 @@ export default {
3838
processMessageIds() {
3939
throw new Error("processMessageIds not implemented");
4040
},
41-
getQuery() {
41+
constructAttachmentQuery() {
4242
return this.q;
4343
},
4444
},
4545
async run() {
4646
const {
4747
gmail,
48-
getQuery,
48+
constructAttachmentQuery,
4949
labels,
5050
} = this;
5151

5252
console.log("Polling for new messages...");
5353

5454
const { messages } = await gmail.listMessages({
55-
q: getQuery(),
55+
q: constructAttachmentQuery(),
5656
labelIds: labels,
5757
maxResults: constants.HISTORICAL_EVENTS,
5858
});

components/gmail_custom_oauth/sources/new-attachment-received/new-attachment-received.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default {
1010
dedupe: "unique",
1111
methods: {
1212
...common.methods,
13-
getQuery() {
13+
constructAttachmentQuery() {
1414
const { q: query } = this;
1515
const hasAttachment = "has:attachment";
1616
return query?.includes(hasAttachment)

0 commit comments

Comments
 (0)