回答編集履歴
1
a
answer
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
const searchKey = 'is:unread "label:テストメール"';
|
9
9
|
const limit = 10;
|
10
10
|
GmailApp.getMessagesForThreads(GmailApp.search(searchKey,0,limit))
|
11
|
-
.reduce((a,c)=>c.reduce((aa,cc)=>[...aa,cc],[]),[])
|
11
|
+
.reduce((a, c) => [...a,c.reduce((aa, cc) => [...aa, cc], [])], [])
|
12
12
|
.forEach(m=>{
|
13
13
|
if(!m.isUnread()) return;
|
14
14
|
m.markRead();
|