@aikaara/chat-sdk 0.9.3 → 0.9.4

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.
@@ -454,9 +454,7 @@ function Il(c, e, t = 15e3) {
454
454
  if (!i && !s && !o) return null;
455
455
  const l = new Date(e.createdAt).getTime();
456
456
  for (let u = c.length - 1; u >= 0; u--) {
457
- const d = c[u];
458
- if (d.role !== e.role) continue;
459
- const p = d.attachments && d.attachments[0], y = (d.metadata ?? {}).attributes;
457
+ const d = c[u], p = d.attachments && d.attachments[0], y = (d.metadata ?? {}).attributes;
460
458
  if (!(!!p || !!(y && y.fileMessage)) || Math.abs(l - new Date(d.createdAt).getTime()) > t) continue;
461
459
  const g = fo(d);
462
460
  if (i && g && i === g) return d;