Compare commits
31 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c36c32c229 | |||
| 104d2c47f5 | |||
| 924c54f1f8 | |||
| e34ef5479d | |||
| 5e8d30d709 | |||
| ac93080595 | |||
| 37d1bdfb76 | |||
| 76b2007f27 | |||
| 676912c295 | |||
| 06d9f35ca9 | |||
| 4cadcd1c57 | |||
| 937b26edcd | |||
| acad0c06dc | |||
| 98995aae89 | |||
| 7a7d92e3f8 | |||
| 1fbaa284f9 | |||
| 9c7dd0460c | |||
| 579277cb29 | |||
| bb0cb90260 | |||
| 56955e12f5 | |||
| b7d9f2b866 | |||
| daaf0bc813 | |||
| bf95867089 | |||
| 9fac156474 | |||
| 230e08037b | |||
| 77ffe59911 | |||
| 313f304ddf | |||
| a74fbb08a6 | |||
| 0e6bad72bb | |||
| 08c19e2951 | |||
| d014a2496e |
+24
-1
@@ -1,7 +1,7 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
package proto;
|
package proto;
|
||||||
|
|
||||||
/// WhatsApp Version: 2.3000.1037162330
|
/// WhatsApp Version: 2.3000.1038024963
|
||||||
|
|
||||||
message ADVDeviceIdentity {
|
message ADVDeviceIdentity {
|
||||||
optional uint32 rawId = 1;
|
optional uint32 rawId = 1;
|
||||||
@@ -4221,6 +4221,8 @@ enum MutationProps {
|
|||||||
CUSTOMER_DATA_ACTION = 83;
|
CUSTOMER_DATA_ACTION = 83;
|
||||||
SUBSCRIPTIONS_SYNC_V2_ACTION = 84;
|
SUBSCRIPTIONS_SYNC_V2_ACTION = 84;
|
||||||
THREAD_PIN_ACTION = 85;
|
THREAD_PIN_ACTION = 85;
|
||||||
|
AUTO_ORGANIZE_BUSINESS_CHAT_SETTING = 86;
|
||||||
|
BIZ_AI_SETTINGS_NUDGE_ACTION = 87;
|
||||||
SHARE_OWN_PN = 10001;
|
SHARE_OWN_PN = 10001;
|
||||||
BUSINESS_BROADCAST_ACTION = 10002;
|
BUSINESS_BROADCAST_ACTION = 10002;
|
||||||
AI_THREAD_DELETE_ACTION = 10003;
|
AI_THREAD_DELETE_ACTION = 10003;
|
||||||
@@ -4866,6 +4868,8 @@ message SyncActionValue {
|
|||||||
optional CustomerDataAction customerDataAction = 83;
|
optional CustomerDataAction customerDataAction = 83;
|
||||||
optional SubscriptionsSyncV2Action subscriptionsSyncV2Action = 84;
|
optional SubscriptionsSyncV2Action subscriptionsSyncV2Action = 84;
|
||||||
optional ThreadPinAction threadPinAction = 85;
|
optional ThreadPinAction threadPinAction = 85;
|
||||||
|
optional AutoOrganizeBusinessChatSetting autoOrganizeBusinessChatSetting = 86;
|
||||||
|
optional BizAISettingsNudgeAction bizAiSettingsNudgeAction = 87;
|
||||||
message AgentAction {
|
message AgentAction {
|
||||||
optional string name = 1;
|
optional string name = 1;
|
||||||
optional int32 deviceID = 2;
|
optional int32 deviceID = 2;
|
||||||
@@ -4885,6 +4889,10 @@ message SyncActionValue {
|
|||||||
optional SyncActionValue.SyncActionMessageRange messageRange = 2;
|
optional SyncActionValue.SyncActionMessageRange messageRange = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message AutoOrganizeBusinessChatSetting {
|
||||||
|
optional bool autoOrganize = 1;
|
||||||
|
}
|
||||||
|
|
||||||
message AvatarUpdatedAction {
|
message AvatarUpdatedAction {
|
||||||
optional AvatarEventType eventType = 1;
|
optional AvatarEventType eventType = 1;
|
||||||
repeated SyncActionValue.StickerAction recentAvatarStickers = 2;
|
repeated SyncActionValue.StickerAction recentAvatarStickers = 2;
|
||||||
@@ -4895,6 +4903,20 @@ message SyncActionValue {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message BizAISettingsNudgeAction {
|
||||||
|
optional BizAISettingsCategory category = 1;
|
||||||
|
optional int64 version = 2;
|
||||||
|
optional int64 updatedAtMs = 3;
|
||||||
|
enum BizAISettingsCategory {
|
||||||
|
UNKNOWN = 0;
|
||||||
|
INSTRUCTIONS = 1;
|
||||||
|
RESPONSE_SETTINGS = 2;
|
||||||
|
EXAMPLE_RESPONSES = 3;
|
||||||
|
KNOWLEDGE = 4;
|
||||||
|
LEAD_GEN = 5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
message BotWelcomeRequestAction {
|
message BotWelcomeRequestAction {
|
||||||
optional bool isSent = 1;
|
optional bool isSent = 1;
|
||||||
}
|
}
|
||||||
@@ -5358,6 +5380,7 @@ message SyncActionValue {
|
|||||||
optional bool shareToFB = 3;
|
optional bool shareToFB = 3;
|
||||||
optional bool shareToIG = 4;
|
optional bool shareToIG = 4;
|
||||||
repeated CustomList customLists = 5;
|
repeated CustomList customLists = 5;
|
||||||
|
repeated StatusDistributionMode modes = 6;
|
||||||
message CustomList {
|
message CustomList {
|
||||||
optional string listId = 1;
|
optional string listId = 1;
|
||||||
optional string name = 2;
|
optional string name = 2;
|
||||||
|
|||||||
Vendored
+56
@@ -10692,6 +10692,8 @@ export namespace proto {
|
|||||||
CUSTOMER_DATA_ACTION = 83,
|
CUSTOMER_DATA_ACTION = 83,
|
||||||
SUBSCRIPTIONS_SYNC_V2_ACTION = 84,
|
SUBSCRIPTIONS_SYNC_V2_ACTION = 84,
|
||||||
THREAD_PIN_ACTION = 85,
|
THREAD_PIN_ACTION = 85,
|
||||||
|
AUTO_ORGANIZE_BUSINESS_CHAT_SETTING = 86,
|
||||||
|
BIZ_AI_SETTINGS_NUDGE_ACTION = 87,
|
||||||
SHARE_OWN_PN = 10001,
|
SHARE_OWN_PN = 10001,
|
||||||
BUSINESS_BROADCAST_ACTION = 10002,
|
BUSINESS_BROADCAST_ACTION = 10002,
|
||||||
AI_THREAD_DELETE_ACTION = 10003
|
AI_THREAD_DELETE_ACTION = 10003
|
||||||
@@ -12309,6 +12311,8 @@ export namespace proto {
|
|||||||
customerDataAction?: (proto.SyncActionValue.ICustomerDataAction|null);
|
customerDataAction?: (proto.SyncActionValue.ICustomerDataAction|null);
|
||||||
subscriptionsSyncV2Action?: (proto.SyncActionValue.ISubscriptionsSyncV2Action|null);
|
subscriptionsSyncV2Action?: (proto.SyncActionValue.ISubscriptionsSyncV2Action|null);
|
||||||
threadPinAction?: (proto.SyncActionValue.IThreadPinAction|null);
|
threadPinAction?: (proto.SyncActionValue.IThreadPinAction|null);
|
||||||
|
autoOrganizeBusinessChatSetting?: (proto.SyncActionValue.IAutoOrganizeBusinessChatSetting|null);
|
||||||
|
bizAiSettingsNudgeAction?: (proto.SyncActionValue.IBizAISettingsNudgeAction|null);
|
||||||
}
|
}
|
||||||
|
|
||||||
class SyncActionValue implements ISyncActionValue {
|
class SyncActionValue implements ISyncActionValue {
|
||||||
@@ -12389,6 +12393,8 @@ export namespace proto {
|
|||||||
public customerDataAction?: (proto.SyncActionValue.ICustomerDataAction|null);
|
public customerDataAction?: (proto.SyncActionValue.ICustomerDataAction|null);
|
||||||
public subscriptionsSyncV2Action?: (proto.SyncActionValue.ISubscriptionsSyncV2Action|null);
|
public subscriptionsSyncV2Action?: (proto.SyncActionValue.ISubscriptionsSyncV2Action|null);
|
||||||
public threadPinAction?: (proto.SyncActionValue.IThreadPinAction|null);
|
public threadPinAction?: (proto.SyncActionValue.IThreadPinAction|null);
|
||||||
|
public autoOrganizeBusinessChatSetting?: (proto.SyncActionValue.IAutoOrganizeBusinessChatSetting|null);
|
||||||
|
public bizAiSettingsNudgeAction?: (proto.SyncActionValue.IBizAISettingsNudgeAction|null);
|
||||||
public static create(properties?: proto.ISyncActionValue): proto.SyncActionValue;
|
public static create(properties?: proto.ISyncActionValue): proto.SyncActionValue;
|
||||||
public static encode(m: proto.ISyncActionValue, w?: $protobuf.Writer): $protobuf.Writer;
|
public static encode(m: proto.ISyncActionValue, w?: $protobuf.Writer): $protobuf.Writer;
|
||||||
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue;
|
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue;
|
||||||
@@ -12470,6 +12476,22 @@ export namespace proto {
|
|||||||
public static getTypeUrl(typeUrlPrefix?: string): string;
|
public static getTypeUrl(typeUrlPrefix?: string): string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface IAutoOrganizeBusinessChatSetting {
|
||||||
|
autoOrganize?: (boolean|null);
|
||||||
|
}
|
||||||
|
|
||||||
|
class AutoOrganizeBusinessChatSetting implements IAutoOrganizeBusinessChatSetting {
|
||||||
|
constructor(p?: proto.SyncActionValue.IAutoOrganizeBusinessChatSetting);
|
||||||
|
public autoOrganize?: (boolean|null);
|
||||||
|
public static create(properties?: proto.SyncActionValue.IAutoOrganizeBusinessChatSetting): proto.SyncActionValue.AutoOrganizeBusinessChatSetting;
|
||||||
|
public static encode(m: proto.SyncActionValue.IAutoOrganizeBusinessChatSetting, w?: $protobuf.Writer): $protobuf.Writer;
|
||||||
|
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.AutoOrganizeBusinessChatSetting;
|
||||||
|
public static fromObject(d: { [k: string]: any }): proto.SyncActionValue.AutoOrganizeBusinessChatSetting;
|
||||||
|
public static toObject(m: proto.SyncActionValue.AutoOrganizeBusinessChatSetting, o?: $protobuf.IConversionOptions): { [k: string]: any };
|
||||||
|
public toJSON(): { [k: string]: any };
|
||||||
|
public static getTypeUrl(typeUrlPrefix?: string): string;
|
||||||
|
}
|
||||||
|
|
||||||
interface IAvatarUpdatedAction {
|
interface IAvatarUpdatedAction {
|
||||||
eventType?: (proto.SyncActionValue.AvatarUpdatedAction.AvatarEventType|null);
|
eventType?: (proto.SyncActionValue.AvatarUpdatedAction.AvatarEventType|null);
|
||||||
recentAvatarStickers?: (proto.SyncActionValue.IStickerAction[]|null);
|
recentAvatarStickers?: (proto.SyncActionValue.IStickerAction[]|null);
|
||||||
@@ -12497,6 +12519,38 @@ export namespace proto {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface IBizAISettingsNudgeAction {
|
||||||
|
category?: (proto.SyncActionValue.BizAISettingsNudgeAction.BizAISettingsCategory|null);
|
||||||
|
version?: (number|Long|null);
|
||||||
|
updatedAtMs?: (number|Long|null);
|
||||||
|
}
|
||||||
|
|
||||||
|
class BizAISettingsNudgeAction implements IBizAISettingsNudgeAction {
|
||||||
|
constructor(p?: proto.SyncActionValue.IBizAISettingsNudgeAction);
|
||||||
|
public category?: (proto.SyncActionValue.BizAISettingsNudgeAction.BizAISettingsCategory|null);
|
||||||
|
public version?: (number|Long|null);
|
||||||
|
public updatedAtMs?: (number|Long|null);
|
||||||
|
public static create(properties?: proto.SyncActionValue.IBizAISettingsNudgeAction): proto.SyncActionValue.BizAISettingsNudgeAction;
|
||||||
|
public static encode(m: proto.SyncActionValue.IBizAISettingsNudgeAction, w?: $protobuf.Writer): $protobuf.Writer;
|
||||||
|
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.BizAISettingsNudgeAction;
|
||||||
|
public static fromObject(d: { [k: string]: any }): proto.SyncActionValue.BizAISettingsNudgeAction;
|
||||||
|
public static toObject(m: proto.SyncActionValue.BizAISettingsNudgeAction, o?: $protobuf.IConversionOptions): { [k: string]: any };
|
||||||
|
public toJSON(): { [k: string]: any };
|
||||||
|
public static getTypeUrl(typeUrlPrefix?: string): string;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace BizAISettingsNudgeAction {
|
||||||
|
|
||||||
|
enum BizAISettingsCategory {
|
||||||
|
UNKNOWN = 0,
|
||||||
|
INSTRUCTIONS = 1,
|
||||||
|
RESPONSE_SETTINGS = 2,
|
||||||
|
EXAMPLE_RESPONSES = 3,
|
||||||
|
KNOWLEDGE = 4,
|
||||||
|
LEAD_GEN = 5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
interface IBotWelcomeRequestAction {
|
interface IBotWelcomeRequestAction {
|
||||||
isSent?: (boolean|null);
|
isSent?: (boolean|null);
|
||||||
}
|
}
|
||||||
@@ -13844,6 +13898,7 @@ export namespace proto {
|
|||||||
shareToFB?: (boolean|null);
|
shareToFB?: (boolean|null);
|
||||||
shareToIG?: (boolean|null);
|
shareToIG?: (boolean|null);
|
||||||
customLists?: (proto.SyncActionValue.StatusPrivacyAction.ICustomList[]|null);
|
customLists?: (proto.SyncActionValue.StatusPrivacyAction.ICustomList[]|null);
|
||||||
|
modes?: (proto.SyncActionValue.StatusPrivacyAction.StatusDistributionMode[]|null);
|
||||||
}
|
}
|
||||||
|
|
||||||
class StatusPrivacyAction implements IStatusPrivacyAction {
|
class StatusPrivacyAction implements IStatusPrivacyAction {
|
||||||
@@ -13853,6 +13908,7 @@ export namespace proto {
|
|||||||
public shareToFB?: (boolean|null);
|
public shareToFB?: (boolean|null);
|
||||||
public shareToIG?: (boolean|null);
|
public shareToIG?: (boolean|null);
|
||||||
public customLists: proto.SyncActionValue.StatusPrivacyAction.ICustomList[];
|
public customLists: proto.SyncActionValue.StatusPrivacyAction.ICustomList[];
|
||||||
|
public modes: proto.SyncActionValue.StatusPrivacyAction.StatusDistributionMode[];
|
||||||
public static create(properties?: proto.SyncActionValue.IStatusPrivacyAction): proto.SyncActionValue.StatusPrivacyAction;
|
public static create(properties?: proto.SyncActionValue.IStatusPrivacyAction): proto.SyncActionValue.StatusPrivacyAction;
|
||||||
public static encode(m: proto.SyncActionValue.IStatusPrivacyAction, w?: $protobuf.Writer): $protobuf.Writer;
|
public static encode(m: proto.SyncActionValue.IStatusPrivacyAction, w?: $protobuf.Writer): $protobuf.Writer;
|
||||||
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.StatusPrivacyAction;
|
public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): proto.SyncActionValue.StatusPrivacyAction;
|
||||||
|
|||||||
@@ -75158,6 +75158,8 @@ export const proto = $root.proto = (() => {
|
|||||||
values[valuesById[83] = "CUSTOMER_DATA_ACTION"] = 83;
|
values[valuesById[83] = "CUSTOMER_DATA_ACTION"] = 83;
|
||||||
values[valuesById[84] = "SUBSCRIPTIONS_SYNC_V2_ACTION"] = 84;
|
values[valuesById[84] = "SUBSCRIPTIONS_SYNC_V2_ACTION"] = 84;
|
||||||
values[valuesById[85] = "THREAD_PIN_ACTION"] = 85;
|
values[valuesById[85] = "THREAD_PIN_ACTION"] = 85;
|
||||||
|
values[valuesById[86] = "AUTO_ORGANIZE_BUSINESS_CHAT_SETTING"] = 86;
|
||||||
|
values[valuesById[87] = "BIZ_AI_SETTINGS_NUDGE_ACTION"] = 87;
|
||||||
values[valuesById[10001] = "SHARE_OWN_PN"] = 10001;
|
values[valuesById[10001] = "SHARE_OWN_PN"] = 10001;
|
||||||
values[valuesById[10002] = "BUSINESS_BROADCAST_ACTION"] = 10002;
|
values[valuesById[10002] = "BUSINESS_BROADCAST_ACTION"] = 10002;
|
||||||
values[valuesById[10003] = "AI_THREAD_DELETE_ACTION"] = 10003;
|
values[valuesById[10003] = "AI_THREAD_DELETE_ACTION"] = 10003;
|
||||||
@@ -85556,6 +85558,8 @@ export const proto = $root.proto = (() => {
|
|||||||
SyncActionValue.prototype.customerDataAction = null;
|
SyncActionValue.prototype.customerDataAction = null;
|
||||||
SyncActionValue.prototype.subscriptionsSyncV2Action = null;
|
SyncActionValue.prototype.subscriptionsSyncV2Action = null;
|
||||||
SyncActionValue.prototype.threadPinAction = null;
|
SyncActionValue.prototype.threadPinAction = null;
|
||||||
|
SyncActionValue.prototype.autoOrganizeBusinessChatSetting = null;
|
||||||
|
SyncActionValue.prototype.bizAiSettingsNudgeAction = null;
|
||||||
|
|
||||||
let $oneOfFields;
|
let $oneOfFields;
|
||||||
|
|
||||||
@@ -86015,6 +86019,18 @@ export const proto = $root.proto = (() => {
|
|||||||
set: $util.oneOfSetter($oneOfFields)
|
set: $util.oneOfSetter($oneOfFields)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Virtual OneOf for proto3 optional field
|
||||||
|
Object.defineProperty(SyncActionValue.prototype, "_autoOrganizeBusinessChatSetting", {
|
||||||
|
get: $util.oneOfGetter($oneOfFields = ["autoOrganizeBusinessChatSetting"]),
|
||||||
|
set: $util.oneOfSetter($oneOfFields)
|
||||||
|
});
|
||||||
|
|
||||||
|
// Virtual OneOf for proto3 optional field
|
||||||
|
Object.defineProperty(SyncActionValue.prototype, "_bizAiSettingsNudgeAction", {
|
||||||
|
get: $util.oneOfGetter($oneOfFields = ["bizAiSettingsNudgeAction"]),
|
||||||
|
set: $util.oneOfSetter($oneOfFields)
|
||||||
|
});
|
||||||
|
|
||||||
SyncActionValue.create = function create(properties) {
|
SyncActionValue.create = function create(properties) {
|
||||||
return new SyncActionValue(properties);
|
return new SyncActionValue(properties);
|
||||||
};
|
};
|
||||||
@@ -86174,6 +86190,10 @@ export const proto = $root.proto = (() => {
|
|||||||
$root.proto.SyncActionValue.SubscriptionsSyncV2Action.encode(m.subscriptionsSyncV2Action, w.uint32(674).fork()).ldelim();
|
$root.proto.SyncActionValue.SubscriptionsSyncV2Action.encode(m.subscriptionsSyncV2Action, w.uint32(674).fork()).ldelim();
|
||||||
if (m.threadPinAction != null && Object.hasOwnProperty.call(m, "threadPinAction"))
|
if (m.threadPinAction != null && Object.hasOwnProperty.call(m, "threadPinAction"))
|
||||||
$root.proto.SyncActionValue.ThreadPinAction.encode(m.threadPinAction, w.uint32(682).fork()).ldelim();
|
$root.proto.SyncActionValue.ThreadPinAction.encode(m.threadPinAction, w.uint32(682).fork()).ldelim();
|
||||||
|
if (m.autoOrganizeBusinessChatSetting != null && Object.hasOwnProperty.call(m, "autoOrganizeBusinessChatSetting"))
|
||||||
|
$root.proto.SyncActionValue.AutoOrganizeBusinessChatSetting.encode(m.autoOrganizeBusinessChatSetting, w.uint32(690).fork()).ldelim();
|
||||||
|
if (m.bizAiSettingsNudgeAction != null && Object.hasOwnProperty.call(m, "bizAiSettingsNudgeAction"))
|
||||||
|
$root.proto.SyncActionValue.BizAISettingsNudgeAction.encode(m.bizAiSettingsNudgeAction, w.uint32(698).fork()).ldelim();
|
||||||
return w;
|
return w;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -86490,6 +86510,14 @@ export const proto = $root.proto = (() => {
|
|||||||
m.threadPinAction = $root.proto.SyncActionValue.ThreadPinAction.decode(r, r.uint32());
|
m.threadPinAction = $root.proto.SyncActionValue.ThreadPinAction.decode(r, r.uint32());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 86: {
|
||||||
|
m.autoOrganizeBusinessChatSetting = $root.proto.SyncActionValue.AutoOrganizeBusinessChatSetting.decode(r, r.uint32());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 87: {
|
||||||
|
m.bizAiSettingsNudgeAction = $root.proto.SyncActionValue.BizAISettingsNudgeAction.decode(r, r.uint32());
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
r.skipType(t & 7);
|
r.skipType(t & 7);
|
||||||
break;
|
break;
|
||||||
@@ -86887,6 +86915,16 @@ export const proto = $root.proto = (() => {
|
|||||||
throw TypeError(".proto.SyncActionValue.threadPinAction: object expected");
|
throw TypeError(".proto.SyncActionValue.threadPinAction: object expected");
|
||||||
m.threadPinAction = $root.proto.SyncActionValue.ThreadPinAction.fromObject(d.threadPinAction);
|
m.threadPinAction = $root.proto.SyncActionValue.ThreadPinAction.fromObject(d.threadPinAction);
|
||||||
}
|
}
|
||||||
|
if (d.autoOrganizeBusinessChatSetting != null) {
|
||||||
|
if (typeof d.autoOrganizeBusinessChatSetting !== "object")
|
||||||
|
throw TypeError(".proto.SyncActionValue.autoOrganizeBusinessChatSetting: object expected");
|
||||||
|
m.autoOrganizeBusinessChatSetting = $root.proto.SyncActionValue.AutoOrganizeBusinessChatSetting.fromObject(d.autoOrganizeBusinessChatSetting);
|
||||||
|
}
|
||||||
|
if (d.bizAiSettingsNudgeAction != null) {
|
||||||
|
if (typeof d.bizAiSettingsNudgeAction !== "object")
|
||||||
|
throw TypeError(".proto.SyncActionValue.bizAiSettingsNudgeAction: object expected");
|
||||||
|
m.bizAiSettingsNudgeAction = $root.proto.SyncActionValue.BizAISettingsNudgeAction.fromObject(d.bizAiSettingsNudgeAction);
|
||||||
|
}
|
||||||
return m;
|
return m;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -87277,6 +87315,16 @@ export const proto = $root.proto = (() => {
|
|||||||
if (o.oneofs)
|
if (o.oneofs)
|
||||||
d._threadPinAction = "threadPinAction";
|
d._threadPinAction = "threadPinAction";
|
||||||
}
|
}
|
||||||
|
if (m.autoOrganizeBusinessChatSetting != null && m.hasOwnProperty("autoOrganizeBusinessChatSetting")) {
|
||||||
|
d.autoOrganizeBusinessChatSetting = $root.proto.SyncActionValue.AutoOrganizeBusinessChatSetting.toObject(m.autoOrganizeBusinessChatSetting, o);
|
||||||
|
if (o.oneofs)
|
||||||
|
d._autoOrganizeBusinessChatSetting = "autoOrganizeBusinessChatSetting";
|
||||||
|
}
|
||||||
|
if (m.bizAiSettingsNudgeAction != null && m.hasOwnProperty("bizAiSettingsNudgeAction")) {
|
||||||
|
d.bizAiSettingsNudgeAction = $root.proto.SyncActionValue.BizAISettingsNudgeAction.toObject(m.bizAiSettingsNudgeAction, o);
|
||||||
|
if (o.oneofs)
|
||||||
|
d._bizAiSettingsNudgeAction = "bizAiSettingsNudgeAction";
|
||||||
|
}
|
||||||
return d;
|
return d;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -87708,6 +87756,94 @@ export const proto = $root.proto = (() => {
|
|||||||
return ArchiveChatAction;
|
return ArchiveChatAction;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
SyncActionValue.AutoOrganizeBusinessChatSetting = (function() {
|
||||||
|
|
||||||
|
function AutoOrganizeBusinessChatSetting(p) {
|
||||||
|
if (p)
|
||||||
|
for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
|
||||||
|
if (p[ks[i]] != null)
|
||||||
|
this[ks[i]] = p[ks[i]];
|
||||||
|
}
|
||||||
|
|
||||||
|
AutoOrganizeBusinessChatSetting.prototype.autoOrganize = null;
|
||||||
|
|
||||||
|
let $oneOfFields;
|
||||||
|
|
||||||
|
// Virtual OneOf for proto3 optional field
|
||||||
|
Object.defineProperty(AutoOrganizeBusinessChatSetting.prototype, "_autoOrganize", {
|
||||||
|
get: $util.oneOfGetter($oneOfFields = ["autoOrganize"]),
|
||||||
|
set: $util.oneOfSetter($oneOfFields)
|
||||||
|
});
|
||||||
|
|
||||||
|
AutoOrganizeBusinessChatSetting.create = function create(properties) {
|
||||||
|
return new AutoOrganizeBusinessChatSetting(properties);
|
||||||
|
};
|
||||||
|
|
||||||
|
AutoOrganizeBusinessChatSetting.encode = function encode(m, w) {
|
||||||
|
if (!w)
|
||||||
|
w = $Writer.create();
|
||||||
|
if (m.autoOrganize != null && Object.hasOwnProperty.call(m, "autoOrganize"))
|
||||||
|
w.uint32(8).bool(m.autoOrganize);
|
||||||
|
return w;
|
||||||
|
};
|
||||||
|
|
||||||
|
AutoOrganizeBusinessChatSetting.decode = function decode(r, l, e) {
|
||||||
|
if (!(r instanceof $Reader))
|
||||||
|
r = $Reader.create(r);
|
||||||
|
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.SyncActionValue.AutoOrganizeBusinessChatSetting();
|
||||||
|
while (r.pos < c) {
|
||||||
|
var t = r.uint32();
|
||||||
|
if (t === e)
|
||||||
|
break;
|
||||||
|
switch (t >>> 3) {
|
||||||
|
case 1: {
|
||||||
|
m.autoOrganize = r.bool();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
r.skipType(t & 7);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return m;
|
||||||
|
};
|
||||||
|
|
||||||
|
AutoOrganizeBusinessChatSetting.fromObject = function fromObject(d) {
|
||||||
|
if (d instanceof $root.proto.SyncActionValue.AutoOrganizeBusinessChatSetting)
|
||||||
|
return d;
|
||||||
|
var m = new $root.proto.SyncActionValue.AutoOrganizeBusinessChatSetting();
|
||||||
|
if (d.autoOrganize != null) {
|
||||||
|
m.autoOrganize = Boolean(d.autoOrganize);
|
||||||
|
}
|
||||||
|
return m;
|
||||||
|
};
|
||||||
|
|
||||||
|
AutoOrganizeBusinessChatSetting.toObject = function toObject(m, o) {
|
||||||
|
if (!o)
|
||||||
|
o = {};
|
||||||
|
var d = {};
|
||||||
|
if (m.autoOrganize != null && m.hasOwnProperty("autoOrganize")) {
|
||||||
|
d.autoOrganize = m.autoOrganize;
|
||||||
|
if (o.oneofs)
|
||||||
|
d._autoOrganize = "autoOrganize";
|
||||||
|
}
|
||||||
|
return d;
|
||||||
|
};
|
||||||
|
|
||||||
|
AutoOrganizeBusinessChatSetting.prototype.toJSON = function toJSON() {
|
||||||
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
||||||
|
};
|
||||||
|
|
||||||
|
AutoOrganizeBusinessChatSetting.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
||||||
|
if (typeUrlPrefix === undefined) {
|
||||||
|
typeUrlPrefix = "type.googleapis.com";
|
||||||
|
}
|
||||||
|
return typeUrlPrefix + "/proto.SyncActionValue.AutoOrganizeBusinessChatSetting";
|
||||||
|
};
|
||||||
|
|
||||||
|
return AutoOrganizeBusinessChatSetting;
|
||||||
|
})();
|
||||||
|
|
||||||
SyncActionValue.AvatarUpdatedAction = (function() {
|
SyncActionValue.AvatarUpdatedAction = (function() {
|
||||||
|
|
||||||
function AvatarUpdatedAction(p) {
|
function AvatarUpdatedAction(p) {
|
||||||
@@ -87852,6 +87988,196 @@ export const proto = $root.proto = (() => {
|
|||||||
return AvatarUpdatedAction;
|
return AvatarUpdatedAction;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
SyncActionValue.BizAISettingsNudgeAction = (function() {
|
||||||
|
|
||||||
|
function BizAISettingsNudgeAction(p) {
|
||||||
|
if (p)
|
||||||
|
for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
|
||||||
|
if (p[ks[i]] != null)
|
||||||
|
this[ks[i]] = p[ks[i]];
|
||||||
|
}
|
||||||
|
|
||||||
|
BizAISettingsNudgeAction.prototype.category = null;
|
||||||
|
BizAISettingsNudgeAction.prototype.version = null;
|
||||||
|
BizAISettingsNudgeAction.prototype.updatedAtMs = null;
|
||||||
|
|
||||||
|
let $oneOfFields;
|
||||||
|
|
||||||
|
// Virtual OneOf for proto3 optional field
|
||||||
|
Object.defineProperty(BizAISettingsNudgeAction.prototype, "_category", {
|
||||||
|
get: $util.oneOfGetter($oneOfFields = ["category"]),
|
||||||
|
set: $util.oneOfSetter($oneOfFields)
|
||||||
|
});
|
||||||
|
|
||||||
|
// Virtual OneOf for proto3 optional field
|
||||||
|
Object.defineProperty(BizAISettingsNudgeAction.prototype, "_version", {
|
||||||
|
get: $util.oneOfGetter($oneOfFields = ["version"]),
|
||||||
|
set: $util.oneOfSetter($oneOfFields)
|
||||||
|
});
|
||||||
|
|
||||||
|
// Virtual OneOf for proto3 optional field
|
||||||
|
Object.defineProperty(BizAISettingsNudgeAction.prototype, "_updatedAtMs", {
|
||||||
|
get: $util.oneOfGetter($oneOfFields = ["updatedAtMs"]),
|
||||||
|
set: $util.oneOfSetter($oneOfFields)
|
||||||
|
});
|
||||||
|
|
||||||
|
BizAISettingsNudgeAction.create = function create(properties) {
|
||||||
|
return new BizAISettingsNudgeAction(properties);
|
||||||
|
};
|
||||||
|
|
||||||
|
BizAISettingsNudgeAction.encode = function encode(m, w) {
|
||||||
|
if (!w)
|
||||||
|
w = $Writer.create();
|
||||||
|
if (m.category != null && Object.hasOwnProperty.call(m, "category"))
|
||||||
|
w.uint32(8).int32(m.category);
|
||||||
|
if (m.version != null && Object.hasOwnProperty.call(m, "version"))
|
||||||
|
w.uint32(16).int64(m.version);
|
||||||
|
if (m.updatedAtMs != null && Object.hasOwnProperty.call(m, "updatedAtMs"))
|
||||||
|
w.uint32(24).int64(m.updatedAtMs);
|
||||||
|
return w;
|
||||||
|
};
|
||||||
|
|
||||||
|
BizAISettingsNudgeAction.decode = function decode(r, l, e) {
|
||||||
|
if (!(r instanceof $Reader))
|
||||||
|
r = $Reader.create(r);
|
||||||
|
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.SyncActionValue.BizAISettingsNudgeAction();
|
||||||
|
while (r.pos < c) {
|
||||||
|
var t = r.uint32();
|
||||||
|
if (t === e)
|
||||||
|
break;
|
||||||
|
switch (t >>> 3) {
|
||||||
|
case 1: {
|
||||||
|
m.category = r.int32();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 2: {
|
||||||
|
m.version = r.int64();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 3: {
|
||||||
|
m.updatedAtMs = r.int64();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
r.skipType(t & 7);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return m;
|
||||||
|
};
|
||||||
|
|
||||||
|
BizAISettingsNudgeAction.fromObject = function fromObject(d) {
|
||||||
|
if (d instanceof $root.proto.SyncActionValue.BizAISettingsNudgeAction)
|
||||||
|
return d;
|
||||||
|
var m = new $root.proto.SyncActionValue.BizAISettingsNudgeAction();
|
||||||
|
switch (d.category) {
|
||||||
|
default:
|
||||||
|
if (typeof d.category === "number") {
|
||||||
|
m.category = d.category;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "UNKNOWN":
|
||||||
|
case 0:
|
||||||
|
m.category = 0;
|
||||||
|
break;
|
||||||
|
case "INSTRUCTIONS":
|
||||||
|
case 1:
|
||||||
|
m.category = 1;
|
||||||
|
break;
|
||||||
|
case "RESPONSE_SETTINGS":
|
||||||
|
case 2:
|
||||||
|
m.category = 2;
|
||||||
|
break;
|
||||||
|
case "EXAMPLE_RESPONSES":
|
||||||
|
case 3:
|
||||||
|
m.category = 3;
|
||||||
|
break;
|
||||||
|
case "KNOWLEDGE":
|
||||||
|
case 4:
|
||||||
|
m.category = 4;
|
||||||
|
break;
|
||||||
|
case "LEAD_GEN":
|
||||||
|
case 5:
|
||||||
|
m.category = 5;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (d.version != null) {
|
||||||
|
if ($util.Long)
|
||||||
|
(m.version = $util.Long.fromValue(d.version)).unsigned = false;
|
||||||
|
else if (typeof d.version === "string")
|
||||||
|
m.version = parseInt(d.version, 10);
|
||||||
|
else if (typeof d.version === "number")
|
||||||
|
m.version = d.version;
|
||||||
|
else if (typeof d.version === "object")
|
||||||
|
m.version = new $util.LongBits(d.version.low >>> 0, d.version.high >>> 0).toNumber();
|
||||||
|
}
|
||||||
|
if (d.updatedAtMs != null) {
|
||||||
|
if ($util.Long)
|
||||||
|
(m.updatedAtMs = $util.Long.fromValue(d.updatedAtMs)).unsigned = false;
|
||||||
|
else if (typeof d.updatedAtMs === "string")
|
||||||
|
m.updatedAtMs = parseInt(d.updatedAtMs, 10);
|
||||||
|
else if (typeof d.updatedAtMs === "number")
|
||||||
|
m.updatedAtMs = d.updatedAtMs;
|
||||||
|
else if (typeof d.updatedAtMs === "object")
|
||||||
|
m.updatedAtMs = new $util.LongBits(d.updatedAtMs.low >>> 0, d.updatedAtMs.high >>> 0).toNumber();
|
||||||
|
}
|
||||||
|
return m;
|
||||||
|
};
|
||||||
|
|
||||||
|
BizAISettingsNudgeAction.toObject = function toObject(m, o) {
|
||||||
|
if (!o)
|
||||||
|
o = {};
|
||||||
|
var d = {};
|
||||||
|
if (m.category != null && m.hasOwnProperty("category")) {
|
||||||
|
d.category = o.enums === String ? $root.proto.SyncActionValue.BizAISettingsNudgeAction.BizAISettingsCategory[m.category] === undefined ? m.category : $root.proto.SyncActionValue.BizAISettingsNudgeAction.BizAISettingsCategory[m.category] : m.category;
|
||||||
|
if (o.oneofs)
|
||||||
|
d._category = "category";
|
||||||
|
}
|
||||||
|
if (m.version != null && m.hasOwnProperty("version")) {
|
||||||
|
if (typeof m.version === "number")
|
||||||
|
d.version = o.longs === String ? String(m.version) : m.version;
|
||||||
|
else
|
||||||
|
d.version = o.longs === String ? longToString(m.version) : o.longs === Number ? longToNumber(m.version) : m.version;
|
||||||
|
if (o.oneofs)
|
||||||
|
d._version = "version";
|
||||||
|
}
|
||||||
|
if (m.updatedAtMs != null && m.hasOwnProperty("updatedAtMs")) {
|
||||||
|
if (typeof m.updatedAtMs === "number")
|
||||||
|
d.updatedAtMs = o.longs === String ? String(m.updatedAtMs) : m.updatedAtMs;
|
||||||
|
else
|
||||||
|
d.updatedAtMs = o.longs === String ? longToString(m.updatedAtMs) : o.longs === Number ? longToNumber(m.updatedAtMs) : m.updatedAtMs;
|
||||||
|
if (o.oneofs)
|
||||||
|
d._updatedAtMs = "updatedAtMs";
|
||||||
|
}
|
||||||
|
return d;
|
||||||
|
};
|
||||||
|
|
||||||
|
BizAISettingsNudgeAction.prototype.toJSON = function toJSON() {
|
||||||
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
||||||
|
};
|
||||||
|
|
||||||
|
BizAISettingsNudgeAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
||||||
|
if (typeUrlPrefix === undefined) {
|
||||||
|
typeUrlPrefix = "type.googleapis.com";
|
||||||
|
}
|
||||||
|
return typeUrlPrefix + "/proto.SyncActionValue.BizAISettingsNudgeAction";
|
||||||
|
};
|
||||||
|
|
||||||
|
BizAISettingsNudgeAction.BizAISettingsCategory = (function() {
|
||||||
|
const valuesById = {}, values = Object.create(valuesById);
|
||||||
|
values[valuesById[0] = "UNKNOWN"] = 0;
|
||||||
|
values[valuesById[1] = "INSTRUCTIONS"] = 1;
|
||||||
|
values[valuesById[2] = "RESPONSE_SETTINGS"] = 2;
|
||||||
|
values[valuesById[3] = "EXAMPLE_RESPONSES"] = 3;
|
||||||
|
values[valuesById[4] = "KNOWLEDGE"] = 4;
|
||||||
|
values[valuesById[5] = "LEAD_GEN"] = 5;
|
||||||
|
return values;
|
||||||
|
})();
|
||||||
|
|
||||||
|
return BizAISettingsNudgeAction;
|
||||||
|
})();
|
||||||
|
|
||||||
SyncActionValue.BotWelcomeRequestAction = (function() {
|
SyncActionValue.BotWelcomeRequestAction = (function() {
|
||||||
|
|
||||||
function BotWelcomeRequestAction(p) {
|
function BotWelcomeRequestAction(p) {
|
||||||
@@ -96080,6 +96406,7 @@ export const proto = $root.proto = (() => {
|
|||||||
function StatusPrivacyAction(p) {
|
function StatusPrivacyAction(p) {
|
||||||
this.userJid = [];
|
this.userJid = [];
|
||||||
this.customLists = [];
|
this.customLists = [];
|
||||||
|
this.modes = [];
|
||||||
if (p)
|
if (p)
|
||||||
for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
|
for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
|
||||||
if (p[ks[i]] != null)
|
if (p[ks[i]] != null)
|
||||||
@@ -96091,6 +96418,7 @@ export const proto = $root.proto = (() => {
|
|||||||
StatusPrivacyAction.prototype.shareToFB = null;
|
StatusPrivacyAction.prototype.shareToFB = null;
|
||||||
StatusPrivacyAction.prototype.shareToIG = null;
|
StatusPrivacyAction.prototype.shareToIG = null;
|
||||||
StatusPrivacyAction.prototype.customLists = $util.emptyArray;
|
StatusPrivacyAction.prototype.customLists = $util.emptyArray;
|
||||||
|
StatusPrivacyAction.prototype.modes = $util.emptyArray;
|
||||||
|
|
||||||
let $oneOfFields;
|
let $oneOfFields;
|
||||||
|
|
||||||
@@ -96133,6 +96461,12 @@ export const proto = $root.proto = (() => {
|
|||||||
for (var i = 0; i < m.customLists.length; ++i)
|
for (var i = 0; i < m.customLists.length; ++i)
|
||||||
$root.proto.SyncActionValue.StatusPrivacyAction.CustomList.encode(m.customLists[i], w.uint32(42).fork()).ldelim();
|
$root.proto.SyncActionValue.StatusPrivacyAction.CustomList.encode(m.customLists[i], w.uint32(42).fork()).ldelim();
|
||||||
}
|
}
|
||||||
|
if (m.modes != null && m.modes.length) {
|
||||||
|
w.uint32(50).fork();
|
||||||
|
for (var i = 0; i < m.modes.length; ++i)
|
||||||
|
w.int32(m.modes[i]);
|
||||||
|
w.ldelim();
|
||||||
|
}
|
||||||
return w;
|
return w;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -96169,6 +96503,17 @@ export const proto = $root.proto = (() => {
|
|||||||
m.customLists.push($root.proto.SyncActionValue.StatusPrivacyAction.CustomList.decode(r, r.uint32()));
|
m.customLists.push($root.proto.SyncActionValue.StatusPrivacyAction.CustomList.decode(r, r.uint32()));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 6: {
|
||||||
|
if (!(m.modes && m.modes.length))
|
||||||
|
m.modes = [];
|
||||||
|
if ((t & 7) === 2) {
|
||||||
|
var c2 = r.uint32() + r.pos;
|
||||||
|
while (r.pos < c2)
|
||||||
|
m.modes.push(r.int32());
|
||||||
|
} else
|
||||||
|
m.modes.push(r.int32());
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
r.skipType(t & 7);
|
r.skipType(t & 7);
|
||||||
break;
|
break;
|
||||||
@@ -96233,6 +96578,40 @@ export const proto = $root.proto = (() => {
|
|||||||
m.customLists[i] = $root.proto.SyncActionValue.StatusPrivacyAction.CustomList.fromObject(d.customLists[i]);
|
m.customLists[i] = $root.proto.SyncActionValue.StatusPrivacyAction.CustomList.fromObject(d.customLists[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (d.modes) {
|
||||||
|
if (!Array.isArray(d.modes))
|
||||||
|
throw TypeError(".proto.SyncActionValue.StatusPrivacyAction.modes: array expected");
|
||||||
|
m.modes = [];
|
||||||
|
for (var i = 0; i < d.modes.length; ++i) {
|
||||||
|
switch (d.modes[i]) {
|
||||||
|
default:
|
||||||
|
if (typeof d.modes[i] === "number") {
|
||||||
|
m.modes[i] = d.modes[i];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "ALLOW_LIST":
|
||||||
|
case 0:
|
||||||
|
m.modes[i] = 0;
|
||||||
|
break;
|
||||||
|
case "DENY_LIST":
|
||||||
|
case 1:
|
||||||
|
m.modes[i] = 1;
|
||||||
|
break;
|
||||||
|
case "CONTACTS":
|
||||||
|
case 2:
|
||||||
|
m.modes[i] = 2;
|
||||||
|
break;
|
||||||
|
case "CLOSE_FRIENDS":
|
||||||
|
case 3:
|
||||||
|
m.modes[i] = 3;
|
||||||
|
break;
|
||||||
|
case "CUSTOM_LIST":
|
||||||
|
case 4:
|
||||||
|
m.modes[i] = 4;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return m;
|
return m;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -96243,6 +96622,7 @@ export const proto = $root.proto = (() => {
|
|||||||
if (o.arrays || o.defaults) {
|
if (o.arrays || o.defaults) {
|
||||||
d.userJid = [];
|
d.userJid = [];
|
||||||
d.customLists = [];
|
d.customLists = [];
|
||||||
|
d.modes = [];
|
||||||
}
|
}
|
||||||
if (m.mode != null && m.hasOwnProperty("mode")) {
|
if (m.mode != null && m.hasOwnProperty("mode")) {
|
||||||
d.mode = o.enums === String ? $root.proto.SyncActionValue.StatusPrivacyAction.StatusDistributionMode[m.mode] === undefined ? m.mode : $root.proto.SyncActionValue.StatusPrivacyAction.StatusDistributionMode[m.mode] : m.mode;
|
d.mode = o.enums === String ? $root.proto.SyncActionValue.StatusPrivacyAction.StatusDistributionMode[m.mode] === undefined ? m.mode : $root.proto.SyncActionValue.StatusPrivacyAction.StatusDistributionMode[m.mode] : m.mode;
|
||||||
@@ -96271,6 +96651,12 @@ export const proto = $root.proto = (() => {
|
|||||||
d.customLists[j] = $root.proto.SyncActionValue.StatusPrivacyAction.CustomList.toObject(m.customLists[j], o);
|
d.customLists[j] = $root.proto.SyncActionValue.StatusPrivacyAction.CustomList.toObject(m.customLists[j], o);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (m.modes && m.modes.length) {
|
||||||
|
d.modes = [];
|
||||||
|
for (var j = 0; j < m.modes.length; ++j) {
|
||||||
|
d.modes[j] = o.enums === String ? $root.proto.SyncActionValue.StatusPrivacyAction.StatusDistributionMode[m.modes[j]] === undefined ? m.modes[j] : $root.proto.SyncActionValue.StatusPrivacyAction.StatusDistributionMode[m.modes[j]] : m.modes[j];
|
||||||
|
}
|
||||||
|
}
|
||||||
return d;
|
return d;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":[2,3000,1037166441]}
|
{"version":[2,3000,1038147544]}
|
||||||
|
|||||||
+19
-2
@@ -31,9 +31,26 @@ export const STATUS_EXPIRY_SECONDS = 24 * 60 * 60
|
|||||||
export const PLACEHOLDER_MAX_AGE_SECONDS = 7 * 24 * 60 * 60
|
export const PLACEHOLDER_MAX_AGE_SECONDS = 7 * 24 * 60 * 60
|
||||||
|
|
||||||
export const NOISE_MODE = 'Noise_XX_25519_AESGCM_SHA256\0\0\0\0'
|
export const NOISE_MODE = 'Noise_XX_25519_AESGCM_SHA256\0\0\0\0'
|
||||||
export const DICT_VERSION = 3
|
|
||||||
|
/**
|
||||||
|
* Protocol mode: 'web' (default) or 'native' (experimental)
|
||||||
|
* - web: WA\x06\x03 — standard WhatsApp Web protocol
|
||||||
|
* - native: WAM\x05 — native Android protocol (may enable view-once media on companions)
|
||||||
|
*
|
||||||
|
* Set via BAILEYS_PROTOCOL env var:
|
||||||
|
* BAILEYS_PROTOCOL=native
|
||||||
|
*/
|
||||||
|
const PROTOCOL_MODE = process.env.BAILEYS_PROTOCOL?.trim().toLowerCase() === 'native' ? 'native' : 'web'
|
||||||
|
|
||||||
|
export const DICT_VERSION = PROTOCOL_MODE === 'native' ? 5 : 3
|
||||||
export const KEY_BUNDLE_TYPE = Buffer.from([5])
|
export const KEY_BUNDLE_TYPE = Buffer.from([5])
|
||||||
export const NOISE_WA_HEADER = Buffer.from([87, 65, 6, DICT_VERSION]) // last is "DICT_VERSION"
|
|
||||||
|
// WA\x06\x03 = web protocol, WAM\x05 = native Android protocol
|
||||||
|
export const NOISE_WA_HEADER = PROTOCOL_MODE === 'native'
|
||||||
|
? Buffer.from([87, 65, 77, DICT_VERSION]) // WAM\x05
|
||||||
|
: Buffer.from([87, 65, 6, DICT_VERSION]) // WA\x06\x03
|
||||||
|
|
||||||
|
export { PROTOCOL_MODE }
|
||||||
/** from: https://stackoverflow.com/questions/3809401/what-is-a-good-regular-expression-to-match-a-url */
|
/** from: https://stackoverflow.com/questions/3809401/what-is-a-good-regular-expression-to-match-a-url */
|
||||||
export const URL_REGEX = /https:\/\/(?![^:@\/\s]+:[^:@\/\s]+@)[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}(:\d+)?(\/[^\s]*)?/g
|
export const URL_REGEX = /https:\/\/(?![^:@\/\s]+:[^:@\/\s]+@)[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}(:\d+)?(\/[^\s]*)?/g
|
||||||
|
|
||||||
|
|||||||
+4
-5
@@ -1060,22 +1060,21 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** sending non-abt props may fix QR scan fail if server expects */
|
/** fetch AB props */
|
||||||
const fetchProps = async () => {
|
const fetchProps = async () => {
|
||||||
//TODO: implement both protocol 1 and protocol 2 prop fetching, specially for abKey for WM
|
|
||||||
const resultNode = await query({
|
const resultNode = await query({
|
||||||
tag: 'iq',
|
tag: 'iq',
|
||||||
attrs: {
|
attrs: {
|
||||||
to: S_WHATSAPP_NET,
|
to: S_WHATSAPP_NET,
|
||||||
xmlns: 'w',
|
xmlns: 'abt',
|
||||||
type: 'get'
|
type: 'get'
|
||||||
},
|
},
|
||||||
content: [
|
content: [
|
||||||
{
|
{
|
||||||
tag: 'props',
|
tag: 'props',
|
||||||
attrs: {
|
attrs: {
|
||||||
protocol: '2',
|
protocol: '1',
|
||||||
hash: authState?.creds?.lastPropHash || ''
|
...(authState?.creds?.lastPropHash ? { hash: authState.creds.lastPropHash } : {})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
+46
-10
@@ -2243,23 +2243,59 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
const handleMessage = async (node: BinaryNode) => {
|
const handleMessage = async (node: BinaryNode) => {
|
||||||
if (shouldIgnoreJid(node.attrs.from!) && node.attrs.from !== S_WHATSAPP_NET) {
|
if (shouldIgnoreJid(node.attrs.from!) && node.attrs.from !== S_WHATSAPP_NET) {
|
||||||
logger.trace({ from: node.attrs.from }, 'ignored message')
|
logger.trace({ from: node.attrs.from }, 'ignored message')
|
||||||
// Send a clean ACK (no error code) so the server considers the
|
|
||||||
// message delivered. Using error 500 (UnhandledError) previously
|
|
||||||
// caused the server to retry delivery, generating duplicate traffic.
|
|
||||||
await sendMessageAck(node)
|
await sendMessageAck(node)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const encNode = getBinaryNodeChild(node, 'enc')
|
const encNode = getBinaryNodeChild(node, 'enc')
|
||||||
// msmsg block removed — allow msmsg decryption (required for view-once on linked devices)
|
|
||||||
|
|
||||||
// Handle view-once unavailable sync from primary device.
|
|
||||||
// When the primary device sends a view-once, linked companions receive
|
|
||||||
// <unavailable type="view_once"/> — no enc content, just a sync signal.
|
|
||||||
// Acknowledge and skip decryption (nothing to decrypt).
|
|
||||||
const unavailableNode = getBinaryNodeChild(node, 'unavailable')
|
const unavailableNode = getBinaryNodeChild(node, 'unavailable')
|
||||||
|
|
||||||
|
// msmsg block removed — allow msmsg decryption (required for view-once on linked devices)
|
||||||
if (unavailableNode?.attrs?.type === 'view_once') {
|
if (unavailableNode?.attrs?.type === 'view_once') {
|
||||||
logger.debug({ id: node.attrs.id, from: node.attrs.from }, 'received view_once unavailable sync from primary device')
|
const { fullMessage: voMsg } = decryptMessageNode(
|
||||||
|
node,
|
||||||
|
authState.creds.me!.id,
|
||||||
|
authState.creds.me!.lid || '',
|
||||||
|
signalRepository,
|
||||||
|
logger,
|
||||||
|
)
|
||||||
|
voMsg.key.isViewOnce = true
|
||||||
|
|
||||||
|
// Try to request the actual view-once content from the primary phone via PDO
|
||||||
|
// The phone may resend the full media (url, mediaKey, directPath, etc.)
|
||||||
|
console.log(`[VO_PDO] Requesting view-once content via PDO for ${voMsg.key.id} from ${voMsg.key.remoteJid}`)
|
||||||
|
try {
|
||||||
|
const requestId = await requestPlaceholderResend(voMsg.key, {
|
||||||
|
key: { ...voMsg.key },
|
||||||
|
pushName: voMsg.pushName,
|
||||||
|
messageTimestamp: voMsg.messageTimestamp,
|
||||||
|
participant: voMsg.key.participant,
|
||||||
|
participantAlt: voMsg.key.participantAlt
|
||||||
|
})
|
||||||
|
if (requestId && requestId !== 'RESOLVED') {
|
||||||
|
console.log(`[VO_PDO] PDO request sent! requestId=${requestId} — waiting for phone to resend`)
|
||||||
|
} else if (requestId === 'RESOLVED') {
|
||||||
|
console.log(`[VO_PDO] Message arrived during PDO delay!`)
|
||||||
|
} else {
|
||||||
|
console.log(`[VO_PDO] Already requested or no response`)
|
||||||
|
}
|
||||||
|
} catch (err: any) {
|
||||||
|
console.log(`[VO_PDO] PDO request failed: ${err.message} — falling back to placeholder`)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Emit placeholder immediately so consumers see the notification
|
||||||
|
// If PDO succeeds, the real message will arrive via messages.upsert later
|
||||||
|
voMsg.message = {
|
||||||
|
viewOnceMessage: {
|
||||||
|
message: {
|
||||||
|
imageMessage: {
|
||||||
|
viewOnce: true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const upsertType = node.attrs.offline ? 'append' : 'notify'
|
||||||
|
await upsertMessage(voMsg, upsertType)
|
||||||
await sendMessageAck(node)
|
await sendMessageAck(node)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { createHash } from 'crypto'
|
|||||||
import { proto } from '../../WAProto/index.js'
|
import { proto } from '../../WAProto/index.js'
|
||||||
import {
|
import {
|
||||||
KEY_BUNDLE_TYPE,
|
KEY_BUNDLE_TYPE,
|
||||||
|
PROTOCOL_MODE,
|
||||||
WA_ADV_ACCOUNT_SIG_PREFIX,
|
WA_ADV_ACCOUNT_SIG_PREFIX,
|
||||||
WA_ADV_DEVICE_SIG_PREFIX,
|
WA_ADV_DEVICE_SIG_PREFIX,
|
||||||
WA_ADV_HOSTED_ACCOUNT_SIG_PREFIX
|
WA_ADV_HOSTED_ACCOUNT_SIG_PREFIX
|
||||||
@@ -58,7 +59,10 @@ const getClientPayload = (config: SocketConfig) => {
|
|||||||
userAgent: getUserAgent(config)
|
userAgent: getUserAgent(config)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Native protocol (WAM\x05) does not use WebInfo — only web protocol does
|
||||||
|
if (PROTOCOL_MODE !== 'native') {
|
||||||
payload.webInfo = getWebInfo(config)
|
payload.webInfo = getWebInfo(config)
|
||||||
|
}
|
||||||
|
|
||||||
return payload
|
return payload
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user