feat: add enable/disable link preview privacy (#1675)

This commit is contained in:
vini
2025-08-06 19:50:24 -03:00
committed by GitHub
parent 260311e6a2
commit aba3ecf969
3 changed files with 24 additions and 0 deletions
+13
View File
@@ -852,6 +852,18 @@ export const makeChatsSocket = (config: SocketConfig) => {
return appPatch(patch)
}
/**
* Enable/Disable link preview privacy, not related to baileys link preview generation
*/
const updateDisableLinkPreviewsPrivacy = (isPreviewsDisabled: boolean) => {
return chatModify(
{
disableLinkPreviews: { isPreviewsDisabled }
},
''
)
}
/**
* Star or Unstar a message
*/
@@ -1144,6 +1156,7 @@ export const makeChatsSocket = (config: SocketConfig) => {
updateProfileStatus,
updateProfileName,
updateBlockStatus,
updateDisableLinkPreviewsPrivacy,
updateCallPrivacy,
updateMessagesPrivacy,
updateLastSeenPrivacy,