Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/sp/comments-likes.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ await item.like();
// unlike an item
await item.unlike();

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

Expand Down
3 changes: 3 additions & 0 deletions packages/sp/comments/item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ _Item.prototype.unlike = async function (this: _Item) {
return spPost(SPQueryable([this, likeUrl]));
};

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