This repository was archived by the owner on Sep 9, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -31,12 +31,16 @@ export function copyFileComments_(
3131 }
3232 const replies = comment . replies ;
3333 comment . replies = [ ] ;
34- const commentId = driveService . Comments . create ( comment , destinationID ) . id ;
34+ const commentId = driveService . Comments . create ( comment , destinationID , {
35+ id : true ,
36+ } ) . id ;
3537 for ( const reply of replies ) {
3638 if ( ! reply . author . me ) {
3739 reply . content = `*${ reply . author . displayName } :*\n${ reply . content } ` ;
3840 }
39- driveService . Replies . create ( reply , destinationID , commentId ) ;
41+ driveService . Replies . create ( reply , destinationID , commentId , {
42+ fields : "id" ,
43+ } ) ;
4044 }
4145 }
4246}
Original file line number Diff line number Diff line change @@ -77,7 +77,9 @@ export const SafeCommentsCollection_ = {
7777 fileId : string ,
7878 fields : F ,
7979 ) : DeepPick < SafeComment , F > => {
80- const ret = Drive . Comments . create ( resource , fileId ) ;
80+ const ret = Drive . Comments . create ( resource , fileId , {
81+ fields : stringifyFields_ ( fields ) ,
82+ } ) ;
8183 if ( ! commentIsSafe_ ( ret , fields ) ) {
8284 throw new Error ( "Comments.create: Comment is not safe." ) ;
8385 }
You can’t perform that action at this time.
0 commit comments