diff --git a/src/webpack/index.ts b/src/webpack/index.ts index b88528e21a..d60ddc1c37 100644 --- a/src/webpack/index.ts +++ b/src/webpack/index.ts @@ -348,6 +348,7 @@ export function search( condition: SearchModuleCondition, reverse = false ): T | null { + console.log(condition); const moduleId = searchId(condition, reverse); if (!moduleId) { diff --git a/src/whatsapp/collections/BusinessProfileCollection.ts b/src/whatsapp/collections/BusinessProfileCollection.ts index 021f13d754..a0c85a4cde 100644 --- a/src/whatsapp/collections/BusinessProfileCollection.ts +++ b/src/whatsapp/collections/BusinessProfileCollection.ts @@ -31,7 +31,10 @@ export declare class BusinessProfileCollection extends Collection m.BusinessProfileCollectionImpl + (m) => m.BusinessProfileCollectionImpl || m.BusinessProfileCollection ); diff --git a/src/whatsapp/collections/CartCollection.ts b/src/whatsapp/collections/CartCollection.ts index 4c16384827..5daefe2cfb 100644 --- a/src/whatsapp/collections/CartCollection.ts +++ b/src/whatsapp/collections/CartCollection.ts @@ -30,6 +30,6 @@ export declare class CartCollection extends Collection { } exportModule( exports, - { CartCollection: 'CartCollectionImpl' }, - (m) => m.CartCollectionImpl + { CartCollection: ['CartCollectionImpl', 'CartCollection'] }, + (m) => m.CartCollectionImpl || m.CartCollection ); diff --git a/src/whatsapp/collections/CatalogCollection.ts b/src/whatsapp/collections/CatalogCollection.ts index 81b7858d5b..d7debbfcfd 100644 --- a/src/whatsapp/collections/CatalogCollection.ts +++ b/src/whatsapp/collections/CatalogCollection.ts @@ -46,6 +46,6 @@ export declare class CatalogCollection extends Collection { } exportModule( exports, - { CatalogCollection: 'CatalogCollectionImpl' }, + { CatalogCollection: ['CatalogCollectionImpl', 'CatalogCollection'] }, (m) => m.CatalogCollectionImpl || m.CatalogCollection ); diff --git a/src/whatsapp/collections/ChatstateCollection.ts b/src/whatsapp/collections/ChatstateCollection.ts index f7a44da9d0..c7ed840b60 100644 --- a/src/whatsapp/collections/ChatstateCollection.ts +++ b/src/whatsapp/collections/ChatstateCollection.ts @@ -27,7 +27,7 @@ export declare class ChatstateCollection extends Collection { exportModule( exports, { - ChatstateCollection: ['ChatstateCollectionImpl', 'ChatstateCollection'], + ChatstateCollection: ['ChatstateCollectionImpl', 'Chatstate'], }, - (m) => m.ChatstateCollectionImpl || m.ChatstateCollection + (m) => m.ChatstateCollectionImpl || m.Chatstate ); diff --git a/src/whatsapp/collections/EmojiVariantCollection.ts b/src/whatsapp/collections/EmojiVariantCollection.ts index 473593998f..90ce689b21 100644 --- a/src/whatsapp/collections/EmojiVariantCollection.ts +++ b/src/whatsapp/collections/EmojiVariantCollection.ts @@ -31,7 +31,10 @@ export declare class EmojiVariantCollection extends Collection m.EmojiVariantCollectionImpl + (m) => m.EmojiVariantCollectionImpl || m.EmojiVariantCollection ); diff --git a/src/whatsapp/collections/LabelCollection.ts b/src/whatsapp/collections/LabelCollection.ts index ef98f90404..b03654f311 100644 --- a/src/whatsapp/collections/LabelCollection.ts +++ b/src/whatsapp/collections/LabelCollection.ts @@ -43,6 +43,6 @@ export declare class LabelCollection extends BaseCollection { } exportModule( exports, - { LabelCollection: 'LabelCollectionImpl' }, - (m) => m.LabelCollectionImpl + { LabelCollection: ['LabelCollectionImpl', 'LabelCollection'] }, + (m) => m.LabelCollectionImpl || m.LabelCollection ); diff --git a/src/whatsapp/collections/MsgInfoCollection.ts b/src/whatsapp/collections/MsgInfoCollection.ts index 2edb3b1638..5e79ac2b3e 100644 --- a/src/whatsapp/collections/MsgInfoCollection.ts +++ b/src/whatsapp/collections/MsgInfoCollection.ts @@ -29,6 +29,6 @@ export declare class MsgInfoCollection extends BaseCollection { } exportModule( exports, - { MsgInfoCollection: 'MsgInfoCollectionImpl' }, - (m) => m.MsgInfoCollectionImpl + { MsgInfoCollection: ['MsgInfoCollectionImpl', 'MsgInfoCollection'] }, + (m) => m.MsgInfoCollectionImpl || m.MsgInfoCollection ); diff --git a/src/whatsapp/collections/MuteCollection.ts b/src/whatsapp/collections/MuteCollection.ts index e302157fea..3d8c8c0fbc 100644 --- a/src/whatsapp/collections/MuteCollection.ts +++ b/src/whatsapp/collections/MuteCollection.ts @@ -36,6 +36,6 @@ export declare class MuteCollection extends Collection { } exportModule( exports, - { MuteCollection: 'MuteCollectionImpl' }, - (m) => m.MuteCollectionImpl + { MuteCollection: ['MuteCollectionImpl', 'MuteCollection'] }, + (m) => m.MuteCollectionImpl || m.MuteCollection ); diff --git a/src/whatsapp/collections/OrderCollection.ts b/src/whatsapp/collections/OrderCollection.ts index 68f5f7409a..bf25b24ed9 100644 --- a/src/whatsapp/collections/OrderCollection.ts +++ b/src/whatsapp/collections/OrderCollection.ts @@ -31,6 +31,6 @@ export declare class OrderCollection extends Collection { } exportModule( exports, - { OrderCollection: 'OrderCollectionImpl' }, - (m) => m.OrderCollectionImpl + { OrderCollection: ['OrderCollectionImpl', 'OrderCollection'] }, + (m) => m.OrderCollectionImpl || m.OrderCollection ); diff --git a/src/whatsapp/collections/PinInChatCollection.ts b/src/whatsapp/collections/PinInChatCollection.ts index 5a2bb2e847..8c80e1018a 100644 --- a/src/whatsapp/collections/PinInChatCollection.ts +++ b/src/whatsapp/collections/PinInChatCollection.ts @@ -32,6 +32,6 @@ export declare class PinInChatCollection extends Collection { } exportModule( exports, - { PinInChatCollection: 'PinInChatCollectionImpl' }, - (m) => m.PinInChatCollectionImpl + { PinInChatCollection: ['PinInChatCollectionImpl', 'PinInChatCollection'] }, + (m) => m.PinInChatCollectionImpl || m.PinInChatCollection ); diff --git a/src/whatsapp/collections/ProductMessageListCollection.ts b/src/whatsapp/collections/ProductMessageListCollection.ts index 8ae3ec5331..1dd5929e38 100644 --- a/src/whatsapp/collections/ProductMessageListCollection.ts +++ b/src/whatsapp/collections/ProductMessageListCollection.ts @@ -27,7 +27,10 @@ export declare class ProductMessageListCollection extends Collection m.ProductMessageListCollectionImpl + (m) => m.ProductMessageListCollectionImpl || m.ProductMessageListCollection ); diff --git a/src/whatsapp/collections/RecentEmojiCollection.ts b/src/whatsapp/collections/RecentEmojiCollection.ts index dc07a562cb..a04ee0a678 100644 --- a/src/whatsapp/collections/RecentEmojiCollection.ts +++ b/src/whatsapp/collections/RecentEmojiCollection.ts @@ -33,7 +33,10 @@ export declare class RecentEmojiCollection extends Collection exportModule( exports, { - RecentEmojiCollection: 'RecentEmojiCollectionImpl', + RecentEmojiCollection: [ + 'RecentEmojiCollectionImpl', + 'RecentEmojiCollection', + ], }, - (m) => m.RecentEmojiCollectionImpl + (m) => m.RecentEmojiCollectionImpl || m.RecentEmojiCollection ); diff --git a/src/whatsapp/collections/RecentStickerCollection.ts b/src/whatsapp/collections/RecentStickerCollection.ts index bdd7cb7e92..294f884a53 100644 --- a/src/whatsapp/collections/RecentStickerCollection.ts +++ b/src/whatsapp/collections/RecentStickerCollection.ts @@ -32,7 +32,10 @@ export declare class RecentStickerCollection extends Collection { exportModule( exports, { - RecentStickerCollection: 'RecentStickerCollectionImpl', + RecentStickerCollection: [ + 'RecentStickerCollectionImpl', + 'RecentStickerCollection', + ], }, - (m) => m.RecentStickerCollectionImpl + (m) => m.RecentStickerCollectionImpl || m.RecentStickerCollection ); diff --git a/src/whatsapp/collections/StatusCollection.ts b/src/whatsapp/collections/StatusCollection.ts index 0bd8287e86..46007a5f20 100644 --- a/src/whatsapp/collections/StatusCollection.ts +++ b/src/whatsapp/collections/StatusCollection.ts @@ -33,7 +33,7 @@ export declare class StatusCollection extends BaseCollection { exportModule( exports, { - StatusCollection: 'TextStatusCollectionImpl', + StatusCollection: ['TextStatusCollectionImpl', 'TextStatusCollection'], }, - (m) => m.TextStatusCollectionImpl + (m) => m.TextStatusCollectionImpl || m.TextStatusCollection ); diff --git a/src/whatsapp/collections/StickerPackCollection.ts b/src/whatsapp/collections/StickerPackCollection.ts index 852a630275..377dcb79b3 100644 --- a/src/whatsapp/collections/StickerPackCollection.ts +++ b/src/whatsapp/collections/StickerPackCollection.ts @@ -39,7 +39,10 @@ export declare class StickerPackCollection extends Collection exportModule( exports, { - StickerPackCollection: 'StickerPackCollectionImpl', + StickerPackCollection: [ + 'StickerPackCollectionImpl', + 'StickerPackCollection', + ], }, - (m) => m.StickerPackCollectionImpl + (m) => m.StickerPackCollectionImpl || m.StickerPackCollection ); diff --git a/src/whatsapp/collections/StickerSearchCollection.ts b/src/whatsapp/collections/StickerSearchCollection.ts index a055a7f580..50645dbcb2 100644 --- a/src/whatsapp/collections/StickerSearchCollection.ts +++ b/src/whatsapp/collections/StickerSearchCollection.ts @@ -33,7 +33,10 @@ export declare class StickerSearchCollection extends Collection { exportModule( exports, { - StickerSearchCollection: 'StickerSearchCollectionImpl', + StickerSearchCollection: [ + 'StickerSearchCollectionImpl', + 'StickerSearchCollection', + ], }, - (m) => m.StickerSearchCollectionImpl + (m) => m.StickerSearchCollectionImpl || m.StickerSearchCollection ); diff --git a/src/whatsapp/models/PresenceModel.ts b/src/whatsapp/models/PresenceModel.ts index 0bdd8ae941..e3fed51551 100644 --- a/src/whatsapp/models/PresenceModel.ts +++ b/src/whatsapp/models/PresenceModel.ts @@ -71,5 +71,5 @@ exportModule( { PresenceModel: 'Presence', }, - (m) => m.Presence && m.ChatstateCollection + (m) => (m.Presence && m.ChatstateCollection) || (m.Presence && m.Chatstate) ); diff --git a/src/whatsapp/stores.ts b/src/whatsapp/stores.ts index 7b9314fd59..4403d3b7ae 100644 --- a/src/whatsapp/stores.ts +++ b/src/whatsapp/stores.ts @@ -244,3 +244,97 @@ exportModule( }, (m) => m.PresenceCollectionImpl || m.PresenceCollection ); + +exportModule( + exports, + { + CartStore: ['CartCollectionImpl', 'CartCollection'], + }, + (m) => m.CartCollectionImpl || m.CartCollection +); + +exportModule( + exports, + { + CatalogStore: ['CatalogCollectionImpl', 'CatalogCollection'], + }, + (m) => m.CatalogCollectionImpl || m.CatalogCollection +); + +exportModule( + exports, + { + EmojiVariantStore: ['EmojiVariantCollectionImpl', 'EmojiVariantCollection'], + }, + (m) => m.EmojiVariantCollectionImpl || m.EmojiVariantCollection +); + +exportModule( + exports, + { + LabelStore: ['LabelCollectionImpl', 'LabelCollection'], + }, + (m) => m.LabelCollectionImpl || m.LabelCollection +); + +exportModule( + exports, + { + MsgInfoStore: ['MsgInfoCollectionImpl', 'MsgInfoCollection'], + }, + (m) => m.MsgInfoCollectionImpl || m.MsgInfoCollection +); + +exportModule( + exports, + { + MuteStore: ['MuteCollectionImpl', 'MuteCollection'], + }, + (m) => m.MuteCollectionImpl || m.MuteCollection +); + +exportModule( + exports, + { + OrderStore: ['OrderCollectionImpl', 'OrderCollection'], + }, + (m) => m.OrderCollectionImpl || m.OrderCollection +); + +exportModule( + exports, + { + PinInChatStore: ['PinInChatCollectionImpl', 'PinInChatCollection'], + }, + (m) => m.PinInChatCollectionImpl || m.PinInChatCollection +); + +exportModule( + exports, + { + ProductMessageListStore: [ + 'ProductMessageListCollectionImpl', + 'ProductMessageListCollection', + ], + }, + (m) => m.ProductMessageListCollectionImpl || m.ProductMessageListCollection +); + +exportModule( + exports, + { + RecentEmojiStore: ['RecentEmojiCollectionImpl', 'RecentEmojiCollection'], + }, + (m) => m.RecentEmojiCollectionImpl || m.RecentEmojiCollection +); + +exportModule( + exports, + { + StickerSearchStore: [ + 'StickerSearchCollectionImpl', + 'StickerSearchCollection', + ], + }, + (m) => m.StickerSearchCollectionImpl || m.StickerSearchCollection +);