Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

1.1 KB
Raw Blame
{
  "db_name": "PostgreSQL",
  "query": "INSERT INTO whatsapp_participant_receipt (account_id, chat_id, source_id, participant_jid, receipt_state, source_at)\n                SELECT $1, b.id, source.id, $5, $6, $7\n                FROM external_chat b JOIN whatsapp_chat_membership m ON m.chat_id = b.id\n                CROSS JOIN (SELECT DISTINCT unnest($4::text[]) AS id) source\n                WHERE b.provider = 'whatsapp' AND b.remote_id = $2 AND m.account_id = $1 AND m.generation = $3 AND m.consent_ended_at IS NULL\n                  AND external_chat_can_view(b.id, $8)\n                ON CONFLICT (account_id, chat_id, source_id, participant_jid, receipt_state)\n                DO UPDATE SET source_at = GREATEST(whatsapp_participant_receipt.source_at, excluded.source_at)",
  "describe": {
    "columns": [],
    "parameters": {
      "Left": [
        "Uuid",
        "Text",
        "Int8",
        "TextArray",
        "Text",
        "Text",
        "Timestamptz",
        "Text"
      ]
    },
    "nullable": []
  },
  "hash": "931262e44893d5dc3fad09c64b55b457bcf666de272b6527a2bfc372c599b764"
}