@lazyneoaz/metachat 5.1.0 → 5.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -90732,7 +90732,7 @@ async function publishLsRequestWithAck(params) {
90732
90732
  }, timeoutMs);
90733
90733
  });
90734
90734
  }
90735
- function buildWsTaskContent(ctx, tasks, versionId) {
90735
+ function buildWsTaskContent(ctx, tasks, versionId, appId = "2220391788200892") {
90736
90736
  ctx.wsReqNumber = (ctx.wsReqNumber || 0) + 1;
90737
90737
  if (ctx.wsTaskNumber === void 0 || ctx.wsTaskNumber === null) {
90738
90738
  ctx.wsTaskNumber = 0;
@@ -90744,7 +90744,7 @@ function buildWsTaskContent(ctx, tasks, versionId) {
90744
90744
  if (task.failure_count === void 0) task.failure_count = null;
90745
90745
  });
90746
90746
  return {
90747
- app_id: "2220391788200892",
90747
+ app_id: appId,
90748
90748
  payload: JSON.stringify({
90749
90749
  data_trace_id: null,
90750
90750
  epoch_id: parseInt(
@@ -93123,6 +93123,8 @@ function gcmember_default(defaultFuncs, api, ctx) {
93123
93123
  let queryPayload;
93124
93124
  let query;
93125
93125
  let finalUsers = usersToModify;
93126
+ let versionId;
93127
+ let appId;
93126
93128
  if (action === "add") {
93127
93129
  const usersToAdd = usersToModify.filter((id) => !currentMembers.includes(id));
93128
93130
  if (usersToAdd.length === 0) {
@@ -93130,8 +93132,8 @@ function gcmember_default(defaultFuncs, api, ctx) {
93130
93132
  }
93131
93133
  finalUsers = usersToAdd;
93132
93134
  queryPayload = {
93133
- thread_key: parseInt(threadID),
93134
- contact_ids: finalUsers.map((id) => parseInt(id)),
93135
+ thread_key: threadID,
93136
+ contact_ids: finalUsers,
93135
93137
  sync_group: 1
93136
93138
  };
93137
93139
  query = {
@@ -93140,6 +93142,8 @@ function gcmember_default(defaultFuncs, api, ctx) {
93140
93142
  payload: JSON.stringify(queryPayload),
93141
93143
  queue_name: String(threadID)
93142
93144
  };
93145
+ versionId = "24502707779384158";
93146
+ appId = "772021112871879";
93143
93147
  } else {
93144
93148
  const userToRemove = usersToModify[0];
93145
93149
  if (!currentMembers.includes(userToRemove)) {
@@ -93153,8 +93157,10 @@ function gcmember_default(defaultFuncs, api, ctx) {
93153
93157
  payload: JSON.stringify(queryPayload),
93154
93158
  queue_name: "remove_participant_v2"
93155
93159
  };
93160
+ versionId = "25002366262773827";
93161
+ appId = "2220391788200892";
93156
93162
  }
93157
- const content = buildWsTaskContent(ctx, [query], "24631415369801570");
93163
+ const content = buildWsTaskContent(ctx, [query], versionId, appId);
93158
93164
  await publishLsRequestWithAck({
93159
93165
  client: ctx.mqttClient,
93160
93166
  content,
package/dist/index.mjs CHANGED
@@ -90697,7 +90697,7 @@ async function publishLsRequestWithAck(params) {
90697
90697
  }, timeoutMs);
90698
90698
  });
90699
90699
  }
90700
- function buildWsTaskContent(ctx, tasks, versionId) {
90700
+ function buildWsTaskContent(ctx, tasks, versionId, appId = "2220391788200892") {
90701
90701
  ctx.wsReqNumber = (ctx.wsReqNumber || 0) + 1;
90702
90702
  if (ctx.wsTaskNumber === void 0 || ctx.wsTaskNumber === null) {
90703
90703
  ctx.wsTaskNumber = 0;
@@ -90709,7 +90709,7 @@ function buildWsTaskContent(ctx, tasks, versionId) {
90709
90709
  if (task.failure_count === void 0) task.failure_count = null;
90710
90710
  });
90711
90711
  return {
90712
- app_id: "2220391788200892",
90712
+ app_id: appId,
90713
90713
  payload: JSON.stringify({
90714
90714
  data_trace_id: null,
90715
90715
  epoch_id: parseInt(
@@ -93088,6 +93088,8 @@ function gcmember_default(defaultFuncs, api, ctx) {
93088
93088
  let queryPayload;
93089
93089
  let query;
93090
93090
  let finalUsers = usersToModify;
93091
+ let versionId;
93092
+ let appId;
93091
93093
  if (action === "add") {
93092
93094
  const usersToAdd = usersToModify.filter((id) => !currentMembers.includes(id));
93093
93095
  if (usersToAdd.length === 0) {
@@ -93095,8 +93097,8 @@ function gcmember_default(defaultFuncs, api, ctx) {
93095
93097
  }
93096
93098
  finalUsers = usersToAdd;
93097
93099
  queryPayload = {
93098
- thread_key: parseInt(threadID),
93099
- contact_ids: finalUsers.map((id) => parseInt(id)),
93100
+ thread_key: threadID,
93101
+ contact_ids: finalUsers,
93100
93102
  sync_group: 1
93101
93103
  };
93102
93104
  query = {
@@ -93105,6 +93107,8 @@ function gcmember_default(defaultFuncs, api, ctx) {
93105
93107
  payload: JSON.stringify(queryPayload),
93106
93108
  queue_name: String(threadID)
93107
93109
  };
93110
+ versionId = "24502707779384158";
93111
+ appId = "772021112871879";
93108
93112
  } else {
93109
93113
  const userToRemove = usersToModify[0];
93110
93114
  if (!currentMembers.includes(userToRemove)) {
@@ -93118,8 +93122,10 @@ function gcmember_default(defaultFuncs, api, ctx) {
93118
93122
  payload: JSON.stringify(queryPayload),
93119
93123
  queue_name: "remove_participant_v2"
93120
93124
  };
93125
+ versionId = "25002366262773827";
93126
+ appId = "2220391788200892";
93121
93127
  }
93122
- const content = buildWsTaskContent(ctx, [query], "24631415369801570");
93128
+ const content = buildWsTaskContent(ctx, [query], versionId, appId);
93123
93129
  await publishLsRequestWithAck({
93124
93130
  client: ctx.mqttClient,
93125
93131
  content,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lazyneoaz/metachat",
3
- "version": "5.1.0",
3
+ "version": "5.1.1",
4
4
  "description": "A modern TypeScript Facebook Chat API client for building reliable Messenger bots, with built-in anti-detection protection, automatic cookie refresh, music search, and AI theme support.",
5
5
  "license": "MIT",
6
6
  "author": {