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