@automagik/omni 2.260616.1 → 2.260617.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.js CHANGED
@@ -124971,7 +124971,7 @@ import { fileURLToPath } from "url";
124971
124971
  // package.json
124972
124972
  var package_default = {
124973
124973
  name: "@automagik/omni",
124974
- version: "2.260616.1",
124974
+ version: "2.260617.1",
124975
124975
  description: "LLM-optimized CLI for Omni",
124976
124976
  type: "module",
124977
124977
  bin: {
@@ -225245,7 +225245,7 @@ var init_sentry_scrub = __esm(() => {
225245
225245
  var require_package7 = __commonJS((exports, module) => {
225246
225246
  module.exports = {
225247
225247
  name: "@omni/api",
225248
- version: "2.260616.1",
225248
+ version: "2.260617.1",
225249
225249
  type: "module",
225250
225250
  exports: {
225251
225251
  ".": {
@@ -366524,11 +366524,21 @@ function toUnixSeconds(ts) {
366524
366524
  return Math.floor(Date.now() / 1000);
366525
366525
  return Math.floor(n2 > 1000000000000 ? n2 / 1000 : n2);
366526
366526
  }
366527
+ function textDigest(text) {
366528
+ let h2 = 2166136261;
366529
+ for (let i = 0;i < text.length; i++) {
366530
+ h2 ^= text.charCodeAt(i);
366531
+ h2 = Math.imul(h2, 16777619);
366532
+ }
366533
+ return (h2 >>> 0).toString(36);
366534
+ }
366527
366535
  function normalizeSimplifiedWebhook(p2) {
366528
366536
  const phone = p2.sender.id;
366529
366537
  const text = p2.message?.text;
366538
+ if (!text)
366539
+ return null;
366530
366540
  const tsSeconds = toUnixSeconds(p2.message?.timestamp);
366531
- const id = p2.message?.id ?? `gs-simplified-${phone}-${tsSeconds}-${text ? text.length : 0}`;
366541
+ const id = p2.message?.id ?? `gs-simplified-${phone}-${tsSeconds}-${textDigest(text)}`;
366532
366542
  return {
366533
366543
  source: "gupshup-hv-entry-flow-simplified",
366534
366544
  sender: phone,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automagik/omni",
3
- "version": "2.260616.1",
3
+ "version": "2.260617.1",
4
4
  "description": "LLM-optimized CLI for Omni",
5
5
  "type": "module",
6
6
  "bin": {