@alfe.ai/openclaw-google-chat 0.0.5 → 0.0.6

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/plugin2.cjs CHANGED
@@ -156,10 +156,6 @@ async function listMembers(token, spaceName) {
156
156
  } while (pageToken);
157
157
  return allMembers;
158
158
  }
159
- /** Fetch the last N messages from a space (for backfill on new space discovery). */
160
- async function listRecentMessages(token, spaceName, limit) {
161
- return (await request(token, `/${spaceName}/messages?${new URLSearchParams({ pageSize: String(limit) }).toString()}`)).messages ?? [];
162
- }
163
159
  //#endregion
164
160
  //#region src/markdown-to-gchat.ts
165
161
  /**
@@ -202,7 +198,6 @@ const WARM_THRESHOLD_MS = 1800 * 1e3;
202
198
  const DORMANT_THRESHOLD_MS = 7200 * 1e3;
203
199
  const DISCOVERY_INTERVAL_MS = 3e4;
204
200
  const DEDUP_SIZE = 100;
205
- const BACKFILL_COUNT = 20;
206
201
  const MAX_RETRY_DELAY_MS = 6e4;
207
202
  const BASE_RETRY_DELAY_MS = 2e3;
208
203
  var GChatPoller = class {
@@ -285,13 +280,7 @@ var GChatPoller = class {
285
280
  } catch (err) {
286
281
  this.log.warn(`Failed to resolve members for ${spaceName}: ${err instanceof Error ? err.message : String(err)}`);
287
282
  }
288
- let lastSeenTimestamp = this.stateManager.getLastSeenTimestamp(spaceName);
289
- try {
290
- const recent = await listRecentMessages(token, spaceName, BACKFILL_COUNT);
291
- if (recent.length > 0) lastSeenTimestamp = recent[recent.length - 1].createTime;
292
- } catch (err) {
293
- this.log.warn(`Backfill failed for ${spaceName}: ${err instanceof Error ? err.message : String(err)}`);
294
- }
283
+ const lastSeenTimestamp = this.stateManager.getLastSeenTimestamp(spaceName) || (/* @__PURE__ */ new Date()).toISOString();
295
284
  this.stateManager.updateSpace(spaceName, {
296
285
  lastSeenTimestamp,
297
286
  agentUserId,
package/dist/plugin2.js CHANGED
@@ -156,10 +156,6 @@ async function listMembers(token, spaceName) {
156
156
  } while (pageToken);
157
157
  return allMembers;
158
158
  }
159
- /** Fetch the last N messages from a space (for backfill on new space discovery). */
160
- async function listRecentMessages(token, spaceName, limit) {
161
- return (await request(token, `/${spaceName}/messages?${new URLSearchParams({ pageSize: String(limit) }).toString()}`)).messages ?? [];
162
- }
163
159
  //#endregion
164
160
  //#region src/markdown-to-gchat.ts
165
161
  /**
@@ -202,7 +198,6 @@ const WARM_THRESHOLD_MS = 1800 * 1e3;
202
198
  const DORMANT_THRESHOLD_MS = 7200 * 1e3;
203
199
  const DISCOVERY_INTERVAL_MS = 3e4;
204
200
  const DEDUP_SIZE = 100;
205
- const BACKFILL_COUNT = 20;
206
201
  const MAX_RETRY_DELAY_MS = 6e4;
207
202
  const BASE_RETRY_DELAY_MS = 2e3;
208
203
  var GChatPoller = class {
@@ -285,13 +280,7 @@ var GChatPoller = class {
285
280
  } catch (err) {
286
281
  this.log.warn(`Failed to resolve members for ${spaceName}: ${err instanceof Error ? err.message : String(err)}`);
287
282
  }
288
- let lastSeenTimestamp = this.stateManager.getLastSeenTimestamp(spaceName);
289
- try {
290
- const recent = await listRecentMessages(token, spaceName, BACKFILL_COUNT);
291
- if (recent.length > 0) lastSeenTimestamp = recent[recent.length - 1].createTime;
292
- } catch (err) {
293
- this.log.warn(`Backfill failed for ${spaceName}: ${err instanceof Error ? err.message : String(err)}`);
294
- }
283
+ const lastSeenTimestamp = this.stateManager.getLastSeenTimestamp(spaceName) || (/* @__PURE__ */ new Date()).toISOString();
295
284
  this.stateManager.updateSpace(spaceName, {
296
285
  lastSeenTimestamp,
297
286
  agentUserId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfe.ai/openclaw-google-chat",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "OpenClaw Google Chat plugin — DM polling and auto-reply via connected Google account",
5
5
  "type": "module",
6
6
  "main": "./dist/plugin.js",