Skip to content

Commit 62a9382

Browse files
authored
Merge branch 'version-4' into version-4
2 parents a3581e3 + 76efad1 commit 62a9382

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

docs/sp/comments-likes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ await item.like();
252252
// unlike an item
253253
await item.unlike();
254254

255-
// get the liked by information
255+
// ⚠️ getLikedByInformation is deprecated for Items, as the SharePoint REST API no longer works for regular list items. Will continue to work for pages & comments.
256256
const likedByInfo: ILikedByInformation = await item.getLikedByInformation();
257257
```
258258

packages/sp/comments/item.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ _Item.prototype.unlike = async function (this: _Item) {
6363
return spPost(SPQueryable([this, likeUrl]));
6464
};
6565

66+
/**
67+
* @deprecated This method is deprecated as this navigation property does not work in the Microsoft SharePoint REST API.
68+
*/
6669
_Item.prototype.getLikedByInformation = function (this: _Item): Promise<ILikedByInformation> {
6770
return Item(this, "likedByInformation").expand("likedby")<ILikedByInformation>();
6871
};

packages/sp/files/types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,8 @@ export class _File extends ReadableFile<IFileInfo> {
186186
throw Error("The maximum comment length is 1023 characters.");
187187
}
188188

189-
return spPost(File(this, `checkin(comment='${encodePath(comment)}',checkintype=${checkinType})`));
189+
return spPost(File(this, `checkin(comment=@a2,checkintype=@a3)?@a2=${encodeURIComponent(`'${comment.replace(/'/g, "''")}'`)}&@a3=${checkinType}`));
190+
190191
}
191192

192193
/**

0 commit comments

Comments
 (0)