Commit 86e563d 1 parent 1df088c commit 86e563d Copy full SHA for 86e563d
File tree 1 file changed +16
-22
lines changed
packages/uplim-info-gmail/src
1 file changed +16
-22
lines changed Original file line number Diff line number Diff line change @@ -12,31 +12,25 @@ function main() {
12
12
13
13
if ( isLabeled ) continue ;
14
14
15
- let hasUnreadMessage = false ;
16
15
for ( const message of thread . getMessages ( ) ) {
17
- if ( message . isUnread ( ) ) {
18
- hasUnreadMessage = true ;
19
- const text = createMessage ( message ) ;
20
-
21
- const cutText =
22
- text . length > 2000 ? `${ text . substring ( 0 , 1995 ) } ...` : text ;
23
-
24
- // biome-ignore lint/style/useTemplate: エスケープめっちゃ必要でむしろ読みにくくなるので
25
- const codeBlock = "```\n" + cutText + "\n```" ;
26
-
27
- postMessage ( {
28
- username : "info@uplim.co.jp" ,
29
- parse : "full" ,
30
- avatar_url :
31
- "https://cdn.discordapp.com/attachments/792765244040675389/921661726863282176/pngegg.png" ,
32
- content : codeBlock ,
33
- } ) ;
34
- }
35
- }
16
+ const text = createMessage ( message ) ;
17
+
18
+ const cutText =
19
+ text . length > 2000 ? `${ text . substring ( 0 , 1995 ) } ...` : text ;
36
20
37
- if ( hasUnreadMessage ) {
38
- thread . addLabel ( label ) ;
21
+ // biome-ignore lint/style/useTemplate: エスケープめっちゃ必要でむしろ読みにくくなるので
22
+ const codeBlock = "```\n" + cutText + "\n```" ;
23
+
24
+ postMessage ( {
25
+ username : "info@uplim.co.jp" ,
26
+ parse : "full" ,
27
+ avatar_url :
28
+ "https://cdn.discordapp.com/attachments/792765244040675389/921661726863282176/pngegg.png" ,
29
+ content : codeBlock ,
30
+ } ) ;
39
31
}
32
+
33
+ thread . addLabel ( label ) ;
40
34
}
41
35
}
42
36
You can’t perform that action at this time.
0 commit comments