Skip to content

Commit 2c14b5e

Browse files
committed
fix(message-upload): Fix message upload if uploading to a child folder of Inbox using MS Graph API
1 parent bafcd1c commit 2c14b5e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/email-client/outlook-client.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -1692,7 +1692,7 @@ class OutlookClient extends BaseClient {
16921692
return {
16931693
mailboxId: mailbox.id,
16941694
path: []
1695-
.concat(parentFolder?.path || [])
1695+
.concat(parentFolder?.pathName || [])
16961696
.concat(mailbox.displayName)
16971697
.join('/'),
16981698
created: true
@@ -2069,6 +2069,8 @@ class OutlookClient extends BaseClient {
20692069

20702070
path = [].concat(path || []).join('/');
20712071

2072+
console.log('RESOLVING FOLDER', { path, options });
2073+
20722074
let cachedListing = await this.getCachedMailboxListing();
20732075
let mailboxListing = cachedListing || (await this.getMailboxListing());
20742076

@@ -2100,7 +2102,7 @@ class OutlookClient extends BaseClient {
21002102
if (/^inbox$/i.test(pathParts[0])) {
21012103
let inboxFolder = mailboxListing.find(entry => entry.specialUse === '\\Inbox');
21022104
if (inboxFolder) {
2103-
pathParts[0] = inboxFolder.path;
2105+
pathParts[0] = inboxFolder.pathName;
21042106
}
21052107
}
21062108
path = pathParts.join('/');

0 commit comments

Comments
 (0)