obol-ai 0.3.39 → 0.3.40

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/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.3.40
2
+ - changelog
3
+ - skip rate limiter for media group messages
4
+
1
5
  ## 0.3.39
2
6
  - changelog
3
7
  - sequential media downloads and image vision in read_file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "obol-ai",
3
- "version": "0.3.39",
3
+ "version": "0.3.40",
4
4
  "description": "Self-evolving AI assistant that learns, remembers, and acts on its own. Persistent vector memory, self-rewriting personality, proactive heartbeats.",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -166,13 +166,16 @@ function registerMediaHandler(bot, telegramConfig, deps) {
166
166
  async function handleMedia(ctx) {
167
167
  if (!ctx.from) return;
168
168
  const userId = ctx.from.id;
169
- const { createRateLimiter } = require('../rate-limit');
170
- if (!bot._rateLimiter) bot._rateLimiter = createRateLimiter();
171
- const rateResult = bot._rateLimiter.check(userId);
172
- if (rateResult) return;
173
169
  const fileInfo = media.getFileInfo(ctx);
174
170
  if (!fileInfo) return;
175
171
 
172
+ if (!ctx.message.media_group_id) {
173
+ const { createRateLimiter } = require('../rate-limit');
174
+ if (!bot._rateLimiter) bot._rateLimiter = createRateLimiter();
175
+ const rateResult = bot._rateLimiter.check(userId);
176
+ if (rateResult) return;
177
+ }
178
+
176
179
  if (fileInfo.fileSize > MAX_MEDIA_SIZE) {
177
180
  await ctx.reply(`File too large (${(fileInfo.fileSize / 1024 / 1024).toFixed(1)}MB). Max is 50MB.`).catch(() => {});
178
181
  return;