Skip to content

Commit

Permalink
fix: Fixed send message to newsletter (close #2528)
Browse files Browse the repository at this point in the history
  • Loading branch information
icleitoncosta committed Nov 27, 2024
1 parent c0c04d0 commit a121ac0
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/chat/patch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ function applyPatchModel() {
isUser: functions.getIsUser,
isPSA: functions.getIsPSA,
isGroup: functions.getIsGroup,
isNewsletter: functions.getIsNewsletter,
previewMessage: functions.getPreviewMessage,
showChangeNumberNotification: functions.getShowChangeNumberNotification,
hasUnread: functions.getHasUnread,
Expand Down
7 changes: 7 additions & 0 deletions src/whatsapp/functions/contactFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ export declare function getIsGroup(contact: ContactModel): any;
*/
export declare function getIsBroadcast(contact: ContactModel): any;

/**
* @whatsapp 660666 >= 2.2327.4
*/
export declare function getIsNewsletter(contact: ContactModel): any;

/**
* @whatsapp 660666 >= 2.2327.4
*/
Expand Down Expand Up @@ -152,6 +157,7 @@ exportModule(
getIsUser: 'getIsUser',
getIsGroup: 'getIsGroup',
getIsBroadcast: 'getIsBroadcast',
getIsNewsletter: 'getIsNewsletter',
getIsPSA: 'getIsPSA',
getIsIAS: 'getIsIAS',
getIsSupportAccount: 'getIsSupportAccount',
Expand All @@ -178,6 +184,7 @@ injectFallbackModule('getIsMyContact', {
getIsMe: (contact: ContactModel) => contact.isMe,
getIsUser: (contact: ContactModel) => contact.isUser,
getIsGroup: (contact: ContactModel) => contact.isGroup,
getIsNewsletter: (contact: ContactModel) => contact.isNewsletter,
getIsBroadcast: (contact: ContactModel) => contact.isBroadcast,
getIsPSA: (contact: ContactModel) => contact.isPSA,
getIsIAS: (contact: ContactModel) => contact.isIAS,
Expand Down
2 changes: 2 additions & 0 deletions src/whatsapp/misc/Wid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ export declare class Wid {

getSignalAddress(): string;

isNewsletter(): boolean;

isBot(): boolean;

isBroadcast(): boolean;
Expand Down
5 changes: 5 additions & 0 deletions src/whatsapp/models/ContactModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ interface Derived {
* @deprecated
*/
isBroadcast: boolean;
/**
* Deprecated in favor of getIsBroadcast
* @deprecated
*/
isNewsletter: boolean;
/**
* Deprecated in favor of getIsPSA
* @deprecated
Expand Down

0 comments on commit a121ac0

Please sign in to comment.