Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
41b669a35c | ||
|
|
7b5ca3bc57 | ||
|
|
bb0c7fd22b | ||
|
|
c79958541e | ||
|
|
94ee8863d6 | ||
|
|
011477262d | ||
|
|
2e8e4cefb0 | ||
|
|
5e2802c098 | ||
|
|
9a6250a055 | ||
|
|
f8cb56525a | ||
|
|
b5b491cb7b | ||
|
|
7eb6be70f9 | ||
|
|
0de8a5fabc | ||
|
|
9fbc18fb70 | ||
|
|
e7ce3368b0 | ||
|
|
729600e9c6 | ||
|
|
54886f385b | ||
|
|
81854ad7ec | ||
|
|
5261d4f281 | ||
|
|
72d9d94342 | ||
|
|
b782ad27a2 | ||
|
|
d7dad5e6c2 | ||
|
|
8765bb4412 | ||
|
|
984be25d51 | ||
|
|
70620207dd | ||
|
|
a96200f981 | ||
|
|
4978abf3d8 | ||
|
|
a67d84f21e | ||
|
|
91f59b38fd | ||
|
|
d0ec351910 | ||
|
|
a7b12874fb | ||
|
|
cd2c7bdd86 | ||
|
|
045077143f | ||
|
|
bcd2199687 | ||
|
|
af108eede4 | ||
|
|
ee1cf838b8 | ||
|
|
0fc74895da | ||
|
|
394937c154 | ||
|
|
71f9adeff4 | ||
|
|
e13ccdab9c | ||
|
|
2074748a7a | ||
|
|
283d63394e | ||
|
|
5cfb53c367 | ||
|
|
9466407b8a | ||
|
|
4b65f0c462 | ||
|
|
23504b35c8 | ||
|
|
dd6ec4ca3a | ||
|
|
8235e5a111 | ||
|
|
55499a6144 | ||
|
|
9dbc4a6085 | ||
|
|
f7c6ce847c | ||
|
|
84eed00415 | ||
|
|
51aa0e3154 | ||
|
|
77893a0eb0 | ||
|
|
4a866d8a08 | ||
|
|
f912353a5c | ||
|
|
a6a1d8dc28 | ||
|
|
150e73aa74 | ||
|
|
a9300b3134 | ||
|
|
bbe3859085 | ||
|
|
b420548dd9 | ||
|
|
741483eec7 | ||
|
|
2acf7e4e17 | ||
|
|
9bca6d904d | ||
|
|
857c586df6 | ||
|
|
df8cb7cecb | ||
|
|
9d0050adb8 | ||
|
|
df927ab04a | ||
|
|
02e5934e8f | ||
|
|
825a4152db | ||
|
|
81b10099af | ||
|
|
3be5f328b0 | ||
|
|
5caa3b8b81 | ||
|
|
8231bf7d8e | ||
|
|
22d94808fb | ||
|
|
57daefa680 | ||
|
|
5cf8704973 | ||
|
|
28da9c34bb | ||
|
|
51ba5e3266 | ||
|
|
f696794ee1 | ||
|
|
c6eca9510b | ||
|
|
9a2fd2fccd | ||
|
|
c0a2d02f0d | ||
|
|
6493d16fd2 | ||
|
|
9f96c678dc | ||
|
|
a81f2ab553 | ||
|
|
8fbf7fa0e5 | ||
|
|
af0bba313a | ||
|
|
76307dec12 | ||
|
|
0b441054ae | ||
|
|
2e8b78aebc | ||
|
|
d01b221a24 | ||
|
|
61bb111768 | ||
|
|
de47d6e445 | ||
|
|
59fe4b30f0 | ||
|
|
166dae8e27 | ||
|
|
5ce64fd30d | ||
|
|
1a4513f437 | ||
|
|
59be4a780f | ||
|
|
74001c2b49 | ||
|
|
a9ce0fb2d9 | ||
|
|
4c3fd1c214 | ||
|
|
a9459fe746 | ||
|
|
5a3228f05b | ||
|
|
befc238db9 | ||
|
|
ae75a1f8d4 | ||
|
|
d1c50bfd73 | ||
|
|
6f540366f4 | ||
|
|
151fc760fe | ||
|
|
be4391a4b6 | ||
|
|
76ae3e0f6b | ||
|
|
f37b6edaa6 | ||
|
|
7095f77f93 | ||
|
|
5853b778f2 | ||
|
|
6405725ce6 | ||
|
|
111d6141aa | ||
|
|
5560b3c8e6 | ||
|
|
d528d541ea | ||
|
|
ab6b51cc1f | ||
|
|
35aa4f2658 | ||
|
|
36db3c37e8 | ||
|
|
b0c9232153 | ||
|
|
0070fb9e5c | ||
|
|
aa33ac4b1d | ||
|
|
1c2bc5b395 | ||
|
|
f2fe18a4c5 | ||
|
|
87fdcbebf6 | ||
|
|
68a4f651ea | ||
|
|
243caa9626 | ||
|
|
863684b916 | ||
|
|
2d543f3728 | ||
|
|
47088cfbee | ||
|
|
66c75cbf79 | ||
|
|
b2c68d88ae | ||
|
|
675e998cba | ||
|
|
db1d20ae36 | ||
|
|
59b40dda4e |
No files matched your search
+17
-13
@@ -3,31 +3,35 @@
|
||||
# https://waha.devlike.pro/docs/how-to/config/
|
||||
#
|
||||
|
||||
# ====================
|
||||
# ===== SECURITY =====
|
||||
# ====================
|
||||
WAHA_API_KEY=00000000000000000000000000000000
|
||||
WAHA_DASHBOARD_USERNAME=admin
|
||||
WAHA_DASHBOARD_PASSWORD=11111111111111111111111111111111
|
||||
WHATSAPP_SWAGGER_USERNAME=admin
|
||||
WHATSAPP_SWAGGER_PASSWORD=11111111111111111111111111111111
|
||||
|
||||
# Disable Dashboard or Swagger
|
||||
WAHA_DASHBOARD_ENABLED=True
|
||||
WHATSAPP_SWAGGER_ENABLED=True
|
||||
|
||||
# ==================
|
||||
# ===== COMMON =====
|
||||
# ==================
|
||||
# WhatsApp engine (WEBJS is default, GOWS or NOWEB for better performance)
|
||||
WHATSAPP_DEFAULT_ENGINE=WEBJS
|
||||
|
||||
# Base URL for the API (used for webhooks, file URLs, etc.)
|
||||
WAHA_BASE_URL=http://localhost:3000
|
||||
# WAHA_PUBLIC_URL=http://localhost:3000
|
||||
|
||||
# Server configuration (if you need to customize hostname/port)
|
||||
# WHATSAPP_API_SCHEMA=http
|
||||
# WHATSAPP_API_PORT=3000
|
||||
# WHATSAPP_API_HOSTNAME=localhost
|
||||
|
||||
# ====================
|
||||
# ===== SECURITY =====
|
||||
# ====================
|
||||
# "sha512:{SHA}" format - below is "admin" api key
|
||||
WAHA_API_KEY=sha512:c7ad44cbad762a5da0a452f9e854fdc1e0e7a52a38015f23f3eab1d80b931dd472634dfac71cd34ebc35d16ab7fb8a90c81f975113d6c7538dc69dd8de9077ec
|
||||
WAHA_DASHBOARD_ENABLED=True
|
||||
WAHA_DASHBOARD_USERNAME=admin
|
||||
WAHA_DASHBOARD_PASSWORD=admin
|
||||
WHATSAPP_SWAGGER_ENABLED=True
|
||||
WHATSAPP_SWAGGER_USERNAME=admin
|
||||
WHATSAPP_SWAGGER_PASSWORD=admin
|
||||
|
||||
# WhatsApp engine (WEBJS is default, GOWS or NOWEB for better performance)
|
||||
WHATSAPP_DEFAULT_ENGINE=WEBJS
|
||||
|
||||
# ===================
|
||||
# ===== LOGGING =====
|
||||
|
||||
@@ -129,6 +129,7 @@ jobs:
|
||||
docker run -d \
|
||||
--name smoke \
|
||||
--rm -p3000:3000 \
|
||||
-e WAHA_API_KEY=test \
|
||||
${{ vars.DOCKER_IMAGE }}:${{ matrix.tag }}
|
||||
|
||||
sleep 3
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
name: Dev
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
docker-build:
|
||||
if: github.repository == 'devlikeapro/waha-plus'
|
||||
runs-on: ${{ matrix.runner }}
|
||||
name:
|
||||
${{ matrix.engine }} - ${{ matrix.browser }} - ${{ matrix.platform }} -
|
||||
${{ matrix.tag }}
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- runner: 'buildjet-4vcpu-ubuntu-2204'
|
||||
tag: 'dev'
|
||||
platform: 'amd64'
|
||||
browser: 'chromium'
|
||||
engine: 'WEBJS'
|
||||
goss: 'goss-linux-amd64'
|
||||
- runner: 'buildjet-4vcpu-ubuntu-2204-arm'
|
||||
tag: 'dev-arm'
|
||||
platform: 'linux/arm64'
|
||||
browser: 'chromium'
|
||||
engine: 'WEBJS'
|
||||
goss: 'goss-linux-arm'
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Check recent changes
|
||||
id: recent
|
||||
run: |
|
||||
count=$(git rev-list --after="24 hours ago" --count HEAD || true)
|
||||
if [ "$count" -gt 0 ]; then
|
||||
echo "has_recent=true" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "has_recent=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: No recent changes summary
|
||||
if: ${{ steps.recent.outputs.has_recent != 'true' }}
|
||||
run:
|
||||
echo "No commits in the last 24 hours; skipping build." >>
|
||||
"$GITHUB_STEP_SUMMARY"
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
if: ${{ steps.recent.outputs.has_recent == 'true' }}
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Docker meta
|
||||
if: ${{ steps.recent.outputs.has_recent == 'true' }}
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: ${{ vars.DOCKER_IMAGE }}
|
||||
flavor: latest=false
|
||||
tags: |
|
||||
type=raw,value=${{ matrix.tag }}
|
||||
|
||||
- name: Login to image repository
|
||||
if: ${{ steps.recent.outputs.has_recent == 'true' }}
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_TOKEN }}
|
||||
|
||||
- name: Build
|
||||
if: ${{ steps.recent.outputs.has_recent == 'true' }}
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile
|
||||
platforms: ${{ matrix.platform }}
|
||||
build-args: |
|
||||
USE_BROWSER=${{ matrix.browser }}
|
||||
WHATSAPP_DEFAULT_ENGINE=${{ matrix.engine }}
|
||||
push: false
|
||||
load: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
||||
- name: Install goss
|
||||
if: ${{ steps.recent.outputs.has_recent == 'true' }}
|
||||
env:
|
||||
GOSS_DOWNLOAD: 'https://github.com/goss-org/goss/releases/download'
|
||||
GOSS_VERSION: 'v0.4.8'
|
||||
run: |
|
||||
curl -L https://github.com/goss-org/goss/releases/download/${{ env.GOSS_VERSION }}/${{ matrix.goss }} -o /usr/local/bin/goss
|
||||
chmod +rx /usr/local/bin/goss
|
||||
|
||||
- name: Run smoke tests
|
||||
if: ${{ steps.recent.outputs.has_recent == 'true' }}
|
||||
working-directory: tests/smoke
|
||||
timeout-minutes: 2
|
||||
run: |
|
||||
docker run -d \
|
||||
--name smoke \
|
||||
--rm -p3000:3000 \
|
||||
-e WAHA_API_KEY=test \
|
||||
${{ vars.DOCKER_IMAGE }}:${{ matrix.tag }}
|
||||
|
||||
sleep 3
|
||||
docker logs smoke
|
||||
goss validate --retry-timeout 30s --sleep 1s
|
||||
docker rm --force smoke
|
||||
|
||||
- name: Push
|
||||
if: ${{ steps.recent.outputs.has_recent == 'true' }}
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile
|
||||
platforms: ${{ matrix.platform }}
|
||||
build-args: |
|
||||
USE_BROWSER=${{ matrix.browser }}
|
||||
WHATSAPP_DEFAULT_ENGINE=${{ matrix.engine }}
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
@@ -0,0 +1,51 @@
|
||||
name: 'github-translate'
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
issue_comment:
|
||||
types: [created]
|
||||
discussion:
|
||||
types: [created]
|
||||
discussion_comment:
|
||||
types: [created]
|
||||
# pull_request_target:
|
||||
# types: [opened, edited]
|
||||
# pull_request_review_comment:
|
||||
# types: [created, edited]
|
||||
|
||||
jobs:
|
||||
en:
|
||||
if: github.repository == 'devlikeapro/waha'
|
||||
permissions:
|
||||
issues: write
|
||||
discussions: write
|
||||
pull-requests: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: devlikeapro/github-translate-action@main
|
||||
env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
IS_MODIFY_TITLE: true
|
||||
CUSTOM_BOT_NOTE: 'English'
|
||||
TARGET_LANGUAGE: 'eng'
|
||||
TRANSLATED_LANGUAGE: 'en'
|
||||
# pt:
|
||||
# permissions:
|
||||
# issues: write
|
||||
# discussions: write
|
||||
# pull-requests: write
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - uses: actions/checkout@v4
|
||||
# - uses: devlikeapro/github-translate-action@main
|
||||
# env:
|
||||
# # GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# with:
|
||||
# IS_MODIFY_TITLE: false
|
||||
# CUSTOM_BOT_NOTE: 'Portuguese'
|
||||
# TARGET_LANGUAGE: 'por'
|
||||
# TRANSLATED_LANGUAGE: 'pt'
|
||||
@@ -67,9 +67,11 @@ repos:
|
||||
exclude: |
|
||||
(?x)^(
|
||||
entrypoint.sh|
|
||||
AGENTS.md|
|
||||
.pre-commit-config.yaml|
|
||||
^src/core/engines/webjs/session.webjs.core.ts|
|
||||
^src/core/engines/webjs/_lodash.js|
|
||||
^tests/perf/.*|
|
||||
^scripts/.*|
|
||||
^scripts/init-waha.js|
|
||||
)$
|
||||
@@ -0,0 +1,124 @@
|
||||
# WAHA Agent Playbook
|
||||
|
||||
This guide summarizes how to explore, modify, and validate the WhatsApp HTTP API
|
||||
(WAHA) codebase when assisting as an automation or coding agent.
|
||||
|
||||
## Product & Variants
|
||||
|
||||
- WAHA ships in **Core** and **Plus** editions. Core lives under `src/core` and
|
||||
only supports the default session plus minimal media features. Plus extends
|
||||
core via `src/plus` to add multi-session orchestration, richer media handling,
|
||||
and external storage integrations.
|
||||
- Core code must remain free from Plus-only references. A pre-commit hook
|
||||
rejects the word `plus` inside core files; reuse abstractions exposed through
|
||||
`@waha/core/**` instead of importing Plus modules from Core.
|
||||
- Commit subjects are validated: changes that touch `src/plus` require a
|
||||
`[PLUS] …` prefix and must not include non-Plus files; everything else must
|
||||
use `[core] …`. Verify against `./.precommit/validate_commit_message.py` if
|
||||
unsure.
|
||||
|
||||
## Tech Stack Snapshot
|
||||
|
||||
- **Runtime**: Node.js 22.x, Yarn 3.6 (Berry). Always install packages and run
|
||||
scripts with Yarn.
|
||||
- **Framework**: NestJS v11 with dependency injection, modular controllers in
|
||||
`src/api`, and Pino-based logging via `nestjs-pino`.
|
||||
- **Engines**: WhatsApp engines are abstracted (`WEBJS`, `GOWS`, `NOWEB`). Core
|
||||
uses `SessionManagerCore`; Plus swaps to `SessionManagerPlus` with extra
|
||||
storage backends (Mongo/Postgres/SQLite).
|
||||
- **ESM Bridge**: ESM-only dependencies (Baileys) load through
|
||||
`src/vendor/esm.ts`. Add new ESM modules there to ensure they load exactly
|
||||
once.
|
||||
- **Utilities**: RxJS streams (`SwitchObservable`, `DefaultMap`) drive webhook
|
||||
event fan-out. Prefer existing helpers in `src/utils` and `src/core/utils`
|
||||
before adding bespoke logic.
|
||||
|
||||
## Repository Landmarks
|
||||
|
||||
- `src/main.ts`: runtime entry point; dynamically loads the correct AppModule
|
||||
(Core vs Plus) and configures global interceptors/filters.
|
||||
- `src/api/**`: REST controllers and WebSocket gateway. Keep handlers thin;
|
||||
delegate to managers/services. HTTP routes follow `/api/{sessionName}/…`;
|
||||
always thread the session name through request DTOs and guards instead of
|
||||
hardcoding `default`.
|
||||
- `src/core/**`: shared abstractions (config services, engine bootstrap,
|
||||
storage, session management). Core only allows the `default` session and
|
||||
cleans up storage on boot.
|
||||
- `src/plus/**`: multi-session orchestration, advanced media services, and
|
||||
external persistence layers (Mongo, Postgres). Reuse this layer when adding
|
||||
Plus-only capabilities.
|
||||
- `src/apps/**`: integrations (e.g., ChatWoot) and application-specific
|
||||
services.
|
||||
- `src/structures/**` and `src/utils/**`: DTOs, enums (event names follow
|
||||
`domain.action`), helper utilities. Maintain naming consistency when
|
||||
introducing new events.
|
||||
- `tests/**`: Jest-based suites; do not add new tests unless explicitly asked,
|
||||
but keep existing tests working.
|
||||
|
||||
## Coding Expectations
|
||||
|
||||
- Favor composable, long-lived solutions. If a helper already exists (e.g.,
|
||||
`parseBool`, `DefaultMap`, media factories), extend it instead of reinventing
|
||||
logic. Lodash ships with the project—prefer its utilities over hand-rolled
|
||||
helpers. Import lodash as a namespace (`import * as lodash from 'lodash';`) so
|
||||
helpers like `lodash.camelCase` stay consistent across files. When a new
|
||||
third-party library seems necessary, confirm with the user, especially if the
|
||||
package looks stale.
|
||||
- Stick to NestJS patterns: inject dependencies through constructors, expose
|
||||
provider tokens from modules, and keep controllers free from business logic.
|
||||
- Logging goes through injected `PinoLogger` or helpers in
|
||||
`src/utils/logging.ts`. `console.log` is blocked by pre-commit.
|
||||
- Respect path aliases (`@waha/...`) defined in `tsconfig.json`; keep imports
|
||||
consistent (use absolute aliases, not relative `../../../`).
|
||||
- Avoid naming unused variables with a leading underscore; if a parameter is
|
||||
required by a signature, explicitly `void` it instead.
|
||||
- For configs, prefer runtime configurability over constants. Environment keys
|
||||
follow `WAHA_*` for global values and `WAHA_SESSION_CONFIG_*` /
|
||||
`session.config.*` for per-session overrides. If both env and config are
|
||||
supported, honor both (`WAHA_WEBJS_CONFIG_*` vs. `session.webjs.config.*`).
|
||||
|
||||
## Language & Localization
|
||||
|
||||
- Keep identifiers (classes, methods, variables) and code comments in English so
|
||||
the codebase stays consistent for the global team.
|
||||
- Route user-visible strings through the existing i18n structure rather than
|
||||
hardcoding text. ChatWoot copy belongs in `src/apps/chatwoot/i18n` with
|
||||
English as the source locale before adding translations.
|
||||
|
||||
## ChatWoot Integration Notes
|
||||
|
||||
- Avoid introducing synthetic events; map onto existing webhook or engine events
|
||||
whenever plausible. Always use the official ChatWoot API client located in
|
||||
`src/apps/chatwoot/client`.
|
||||
- When adding events, align consumer names with webhook/event identifiers (e.g.,
|
||||
`message.any`).
|
||||
|
||||
## Workflow Checklist
|
||||
|
||||
1. Identify whether work targets Core, Plus, or shared layers. If Plus-only,
|
||||
isolate changes to `src/plus` and ensure the commit prefix matches.
|
||||
2. Lean on existing services/managers; extend the appropriate session manager
|
||||
rather than branching logic inline.
|
||||
3. After edits run:
|
||||
- `pre-commit run --all-files`
|
||||
- `yarn build`
|
||||
- `yarn test` Use Node 22. Address lint or formatting issues before
|
||||
proceeding.
|
||||
4. Do **not** start the application yourself; ask the user to run it if runtime
|
||||
validation is required.
|
||||
5. Capture any assumptions or open questions for the user, especially when
|
||||
touching configs, introducing dependencies, or modifying public APIs.
|
||||
|
||||
## Additional Tips
|
||||
|
||||
- Concurrency-sensitive sections (session start/stop) rely on `async-lock`. When
|
||||
adding async flows, reuse `SessionManager.withLock` or existing retry
|
||||
utilities (`promiseTimeout`, `waitUntil`).
|
||||
- Media features centralize through `MediaManager` and `MediaStorageFactory`.
|
||||
When altering media behavior, update both Core and Plus variants where
|
||||
applicable.
|
||||
- Keep docs and code ASCII unless a file already uses other characters. When
|
||||
updating documentation, mirror the concise, actionable tone used here.
|
||||
|
||||
Following this playbook keeps contributions aligned with WAHA’s structure,
|
||||
automation hooks, and release process.
|
||||
@@ -195,6 +195,11 @@ COPY --from=build /git/node_modules ./node_modules
|
||||
COPY --from=build /git/dist ./dist
|
||||
COPY --from=dashboard /dashboard ./dist/dashboard
|
||||
COPY --from=gows /go/gows/bin/gows /app/gows
|
||||
COPY .env.example ./.env.example
|
||||
COPY scripts/init-waha.js ./scripts/init-waha.js
|
||||
RUN chmod +x ./scripts/init-waha.js \
|
||||
&& printf '%s\n' '#!/bin/sh' 'exec node /app/scripts/init-waha.js "$@"' > /usr/local/bin/init-waha \
|
||||
&& chmod +x /usr/local/bin/init-waha
|
||||
ENV WAHA_GOWS_PATH=/app/gows
|
||||
ENV WAHA_GOWS_SOCKET=/tmp/gows.sock
|
||||
|
||||
|
||||
@@ -35,13 +35,13 @@ for-swagger:
|
||||
WHATSAPP_SWAGGER_CONFIG_ADVANCED=true . ${NVM_DIR}/nvm.sh && nvm exec yarn start
|
||||
|
||||
up-noweb:
|
||||
. ${NVM_DIR}/nvm.sh && nvm exec yarn up @adiwajshing/baileys@github:devlikeapro/Baileys#fork-master-2025-07-04
|
||||
yarn up @adiwajshing/baileys@github:devlikeapro/Baileys#fork-master-2025-10-19
|
||||
|
||||
up-noweb-libsignal:
|
||||
. ${NVM_DIR}/nvm.sh && nvm exec yarn up libsignal@github:devlikeapro/libsignal-node#fork-master
|
||||
yarn up libsignal@github:devlikeapro/libsignal-node#fork-master
|
||||
|
||||
up-webjs:
|
||||
. ${NVM_DIR}/nvm.sh && nvm exec yarn up whatsapp-web.js@github:devlikeapro/whatsapp-web.js#fork-main-2025-06-09
|
||||
yarn up whatsapp-web.js@github:devlikeapro/whatsapp-web.js#fork-main-2025-09-10
|
||||
|
||||
start-proxy:
|
||||
docker run --rm -d --name squid-container -e TZ=UTC -p 3128:3128 ubuntu/squid:5.2-22.04_beta
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ services:
|
||||
# NOTE: Only if you're using PostgreSQL to save sessions
|
||||
# https://waha.devlike.pro/docs/how-to/storages/#media---postgresql
|
||||
# postgres:
|
||||
# image: postgres:17
|
||||
# image: postgres:17.6
|
||||
# restart: always
|
||||
# environment:
|
||||
# POSTGRES_USER: postgres
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
# Learn about the various environment variables at
|
||||
# https://www.chatwoot.com/docs/self-hosted/configuration/environment-variables/#rails-production-variables
|
||||
|
||||
# Increase rack default timeout (30s) to avoid timeout errors
|
||||
# Workaround for https://github.com/devlikeapro/waha/issues/1389
|
||||
RACK_TIMEOUT_SERVICE_TIMEOUT=60
|
||||
|
||||
# Used to verify the integrity of signed cookies. so ensure a secure value is set
|
||||
# SECRET_KEY_BASE should be alphanumeric. Avoid special characters or symbols.
|
||||
# Use `rake secret` to generate this variable
|
||||
|
||||
@@ -3,31 +3,32 @@
|
||||
# https://waha.devlike.pro/docs/how-to/config/
|
||||
#
|
||||
|
||||
# ====================
|
||||
# ===== SECURITY =====
|
||||
# ====================
|
||||
WAHA_API_KEY_PLAIN=00000000000000000000000000000000
|
||||
WAHA_API_KEY=00000000000000000000000000000000
|
||||
WAHA_DASHBOARD_USERNAME=admin
|
||||
WAHA_DASHBOARD_PASSWORD=11111111111111111111111111111111
|
||||
WHATSAPP_SWAGGER_USERNAME=admin
|
||||
WHATSAPP_SWAGGER_PASSWORD=11111111111111111111111111111111
|
||||
|
||||
# Disable Dashboard or Swagger
|
||||
WAHA_DASHBOARD_ENABLED=True
|
||||
WHATSAPP_SWAGGER_ENABLED=True
|
||||
|
||||
# ==================
|
||||
# ===== COMMON =====
|
||||
# ==================
|
||||
# Base URL for the API (used for webhooks, file URLs, etc.)
|
||||
WAHA_BASE_URL=http://waha:3000
|
||||
WAHA_PUBLIC_URL=http://localhost:3000
|
||||
|
||||
# Server configuration (if you need to customize hostname/port)
|
||||
# WHATSAPP_API_SCHEMA=http
|
||||
# WHATSAPP_API_PORT=3000
|
||||
# WHATSAPP_API_HOSTNAME=localhost
|
||||
|
||||
# ====================
|
||||
# ===== SECURITY =====
|
||||
# ====================
|
||||
# WAHA Apps requires both sha and plain version
|
||||
WAHA_API_KEY_PLAIN=00000000000000000000000000000000
|
||||
WAHA_API_KEY=sha512:98b6d128682e280b74b324ca82a6bae6e8a3f7174e0605bfd52eb9948fad8984854ec08f7652f32055c4a9f12b69add4850481d9503a7f2225501671d6124648
|
||||
WAHA_DASHBOARD_USERNAME=admin
|
||||
WAHA_DASHBOARD_PASSWORD=11111111111111111111111111111111
|
||||
WHATSAPP_SWAGGER_USERNAME=admin
|
||||
WHATSAPP_SWAGGER_PASSWORD=11111111111111111111111111111111
|
||||
|
||||
WAHA_DASHBOARD_ENABLED=True
|
||||
WHATSAPP_SWAGGER_ENABLED=True
|
||||
|
||||
# WhatsApp engine (WEBJS is default, GOWS or NOWEB for better performance)
|
||||
WHATSAPP_DEFAULT_ENGINE=GOWS
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ services:
|
||||
- 8.8.8.8
|
||||
|
||||
base: &base
|
||||
image: chatwoot/chatwoot:v4.5.2
|
||||
image: chatwoot/chatwoot:v4.6.0
|
||||
env_file: .chatwoot.env ## Change this file for customized env variables
|
||||
volumes:
|
||||
- chatwoot_storage:/app/storage
|
||||
|
||||
@@ -41,11 +41,6 @@ if [ -n "$key" ]; then
|
||||
# If already hashed, use it as is
|
||||
export WAHA_API_KEY="$key"
|
||||
else
|
||||
# Display warning about using plain text API key
|
||||
echo "⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️"
|
||||
echo "WARNING: Plain text API key detected. Converting to hashed format for security."
|
||||
echo "For better security, use WAHA_API_KEY=sha512:{SHA512_HASH_FOR_YOUR_API_KEY}"
|
||||
echo "⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️"
|
||||
# Hash the key using sha512sum
|
||||
HASHED_KEY=$(echo -n "$key" | sha512sum | awk '{print $1}')
|
||||
export WAHA_API_KEY="sha512:$HASHED_KEY"
|
||||
|
||||
Binary file not shown.
Binary file not shown.
+8
-4
@@ -26,7 +26,7 @@
|
||||
"gows:proto": "yarn gows:proto:fetch && yarn gows:proto:build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@adiwajshing/baileys": "github:devlikeapro/Baileys#fork-master-2025-07-04",
|
||||
"@adiwajshing/baileys": "github:devlikeapro/Baileys#fork-master-2025-10-19",
|
||||
"@adiwajshing/keyed-db": "^0.2.4",
|
||||
"@aws-sdk/client-s3": "^3.633.0",
|
||||
"@aws-sdk/s3-request-presigner": "^3.633.0",
|
||||
@@ -76,9 +76,10 @@
|
||||
"joi": "^17.13.3",
|
||||
"knex": "^3.1.0",
|
||||
"libphonenumber-js": "^1.10.36",
|
||||
"libsignal": "github:devlikeapro/libsignal-node#fork-master",
|
||||
"libsignal": "github:WhiskeySockets/libsignal-node#master",
|
||||
"link-preview-js": "^3.0.4",
|
||||
"lodash": "^4.17.21",
|
||||
"long": "^5.3.2",
|
||||
"mime-types": "^2.1.27",
|
||||
"mongodb": "6.9.0",
|
||||
"mustache": "^4.2.0",
|
||||
@@ -101,7 +102,8 @@
|
||||
"sqlite3": "^5.1.7",
|
||||
"swagger-ui-express": "^4.1.4",
|
||||
"ulid": "^2.3.0",
|
||||
"whatsapp-web.js": "github:devlikeapro/whatsapp-web.js#fork-main-2025-06-09",
|
||||
"undici": "^7.16.0",
|
||||
"whatsapp-web.js": "github:devlikeapro/whatsapp-web.js#fork-main-2025-09-10",
|
||||
"write-file-atomic": "^6.0.0",
|
||||
"yaml": "^2.7.1"
|
||||
},
|
||||
@@ -113,7 +115,6 @@
|
||||
"ws": "^8.18.0",
|
||||
"puppeteer": "^24.19.0",
|
||||
"whatwg-url": "13.0.0",
|
||||
"libsignal": "github:devlikeapro/libsignal-node#fork-master",
|
||||
"axios": "^1.9.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -148,6 +149,9 @@
|
||||
"ts"
|
||||
],
|
||||
"rootDir": "src",
|
||||
"moduleNameMapper": {
|
||||
"^@waha/(.*)$": "<rootDir>/$1"
|
||||
},
|
||||
"testRegex": ".test.ts$",
|
||||
"transform": {
|
||||
"^.+\\.(t|j)s$": "ts-jest"
|
||||
|
||||
Executable
+92
@@ -0,0 +1,92 @@
|
||||
#!/usr/bin/env node
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const crypto = require('crypto');
|
||||
|
||||
const projectRoot = path.resolve(__dirname, '..');
|
||||
|
||||
const args = process.argv.slice(2);
|
||||
const forceIndex = args.indexOf('--force');
|
||||
const forceOverwrite = forceIndex !== -1;
|
||||
|
||||
if (forceOverwrite) {
|
||||
args.splice(forceIndex, 1);
|
||||
}
|
||||
|
||||
const folderArg = args[0] || '.';
|
||||
const sourceArgRaw = args[1];
|
||||
const targetArg = args[2] || '.env';
|
||||
|
||||
const envDir = path.resolve(process.cwd(), folderArg);
|
||||
const sourceArg = sourceArgRaw || '.env.example';
|
||||
const templateBaseDir = sourceArgRaw ? envDir : projectRoot;
|
||||
const templatePath = path.isAbsolute(sourceArg)
|
||||
? sourceArg
|
||||
: path.resolve(templateBaseDir, sourceArg);
|
||||
const targetPath = path.isAbsolute(targetArg)
|
||||
? targetArg
|
||||
: path.resolve(envDir, targetArg);
|
||||
|
||||
function exitWithMessage(message, code = 1) {
|
||||
console.error(message);
|
||||
process.exit(code);
|
||||
}
|
||||
|
||||
if (!fs.existsSync(envDir)) {
|
||||
exitWithMessage(`Target directory does not exist: ${envDir}`);
|
||||
}
|
||||
|
||||
if (!fs.existsSync(templatePath)) {
|
||||
exitWithMessage(`Missing template file: ${templatePath}`);
|
||||
}
|
||||
|
||||
if (!forceOverwrite && fs.existsSync(targetPath)) {
|
||||
const stats = fs.statSync(targetPath);
|
||||
if (stats.size > 0) {
|
||||
exitWithMessage(
|
||||
`${targetPath} already exists and is not empty. Remove it manually or rerun with --force to overwrite.`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const exampleContent = fs.readFileSync(templatePath, 'utf8');
|
||||
|
||||
function generateSecret() {
|
||||
return crypto.randomUUID({ disableEntropyCache: true }).replace(/-/g, '');
|
||||
}
|
||||
|
||||
const apiKey = generateSecret();
|
||||
const adminPassword = generateSecret();
|
||||
|
||||
const updatedContent = exampleContent
|
||||
.replace(/^WAHA_API_KEY=.*/m, `WAHA_API_KEY=${apiKey}`)
|
||||
.replace(/^WAHA_API_KEY_PLAIN=.*/m, `WAHA_API_KEY_PLAIN=${apiKey}`)
|
||||
.replace(/^WAHA_DASHBOARD_USERNAME=.*/m, 'WAHA_DASHBOARD_USERNAME=admin')
|
||||
.replace(
|
||||
/^WAHA_DASHBOARD_PASSWORD=.*/m,
|
||||
`WAHA_DASHBOARD_PASSWORD=${adminPassword}`,
|
||||
)
|
||||
.replace(/^WHATSAPP_SWAGGER_USERNAME=.*/m, 'WHATSAPP_SWAGGER_USERNAME=admin')
|
||||
.replace(
|
||||
/^WHATSAPP_SWAGGER_PASSWORD=.*/m,
|
||||
`WHATSAPP_SWAGGER_PASSWORD=${adminPassword}`,
|
||||
);
|
||||
|
||||
fs.writeFileSync(targetPath, updatedContent, { encoding: 'utf8' });
|
||||
|
||||
const lines = [
|
||||
'Credentials generated.',
|
||||
'',
|
||||
'Dashboard and Swagger:',
|
||||
' - Username: admin',
|
||||
` - Password: ${adminPassword}`,
|
||||
'',
|
||||
'API key: ',
|
||||
` - ${apiKey}`,
|
||||
'',
|
||||
'Use it in the Dashboard connection flow: https://waha.devlike.pro/docs/how-to/dashboard/#api-key',
|
||||
];
|
||||
|
||||
console.log(lines.join('\n'));
|
||||
@@ -1,4 +1,3 @@
|
||||
import { isJidGroup } from '@adiwajshing/baileys';
|
||||
import {
|
||||
Body,
|
||||
Controller,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { isLidUser } from '@adiwajshing/baileys/lib/WABinary/jid-utils';
|
||||
import {
|
||||
Controller,
|
||||
Get,
|
||||
@@ -22,6 +21,7 @@ import {
|
||||
import { PaginationParams, SortOrder } from '@waha/structures/pagination.dto';
|
||||
|
||||
import { SessionManager } from '../core/abc/manager.abc';
|
||||
import { isLidUser } from '@waha/core/utils/jids';
|
||||
|
||||
@ApiSecurity('api_key')
|
||||
@Controller('api/:session/lids')
|
||||
|
||||
@@ -51,10 +51,17 @@ export function HasBeenRetried(job: Job): boolean {
|
||||
return attemptsMade > 1;
|
||||
}
|
||||
|
||||
let base =
|
||||
process.env.WAHA_PUBLIC_URL ||
|
||||
process.env.WAHA_BASE_URL ||
|
||||
'http://localhost:3000';
|
||||
// cut / at the end
|
||||
base = base.replace(/\/+$/, '');
|
||||
|
||||
export function JobLink(job: Job): { text: string; url: string } {
|
||||
const text = `${job.queueName} => ${job.id}`;
|
||||
const url = `http://localhost:3000/jobs/queue/${encodeURIComponent(
|
||||
job.queueName,
|
||||
)}/${job.id}`;
|
||||
const url = `${base}/jobs/queue/${encodeURIComponent(job.queueName)}/${
|
||||
job.id
|
||||
}`;
|
||||
return { text: text, url: url };
|
||||
}
|
||||
@@ -2,21 +2,24 @@ import * as process from 'node:process';
|
||||
|
||||
import { parseBool } from '@waha/helpers';
|
||||
import * as basicAuth from 'express-basic-auth';
|
||||
import { Auth } from '@waha/core/auth/config';
|
||||
|
||||
export function BullAuthMiddleware() {
|
||||
let username = process.env.WAHA_DASHBOARD_USERNAME;
|
||||
let password = process.env.WAHA_DASHBOARD_PASSWORD;
|
||||
let username = Auth.dashboard.username.value || '';
|
||||
let password = Auth.dashboard.password.value || '';
|
||||
if (process.env.WAHA_DASHBOARD_ENABLED) {
|
||||
const enabled = parseBool(process.env.WAHA_DASHBOARD_ENABLED);
|
||||
// Generate a random uuid4 username /password to prevent access
|
||||
username = 'admin';
|
||||
password = crypto.randomUUID();
|
||||
if (!enabled) {
|
||||
// Generate a random uuid4 username/password to effectively disable access
|
||||
username = 'admin';
|
||||
password = crypto.randomUUID();
|
||||
}
|
||||
}
|
||||
|
||||
return basicAuth({
|
||||
challenge: true,
|
||||
users: {
|
||||
[username]: password,
|
||||
[String(username)]: String(password),
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
IsString,
|
||||
ValidateNested,
|
||||
} from 'class-validator';
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { ApiExtraModels, ApiProperty } from '@nestjs/swagger';
|
||||
|
||||
export type AllowedAppConfig = ChatWootAppConfig;
|
||||
|
||||
@@ -15,6 +15,7 @@ export enum AppName {
|
||||
chatwoot = 'chatwoot',
|
||||
}
|
||||
|
||||
@ApiExtraModels(ChatWootAppConfig)
|
||||
export class App<T extends AllowedAppConfig = any> {
|
||||
@IsString()
|
||||
id: string;
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
import { ILogger } from '@waha/apps/app_sdk/ILogger';
|
||||
|
||||
export function JestLogger(): ILogger {
|
||||
return {
|
||||
fatal: jest.fn(),
|
||||
error: jest.fn(),
|
||||
warn: jest.fn(),
|
||||
info: jest.fn(),
|
||||
debug: jest.fn(),
|
||||
trace: jest.fn(),
|
||||
};
|
||||
}
|
||||
@@ -44,4 +44,8 @@ export class AppsDisabledService implements IAppsService {
|
||||
async beforeSessionStart(session: WhatsappSession, store: DataStore) {
|
||||
return;
|
||||
}
|
||||
|
||||
async afterSessionStart(session: WhatsappSession, store: DataStore) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -145,7 +145,17 @@ export class AppsEnabledService implements IAppsService {
|
||||
const apps = await repo.getEnabledBySession(session.name);
|
||||
for (const app of apps) {
|
||||
const service = this.getAppService(app);
|
||||
await service.beforeSessionStart(app, session);
|
||||
service.beforeSessionStart(app, session);
|
||||
}
|
||||
}
|
||||
|
||||
async afterSessionStart(session: WhatsappSession, store: DataStore) {
|
||||
const knex = store.getWAHADatabase();
|
||||
const repo = new AppRepository(knex);
|
||||
const apps = await repo.getEnabledBySession(session.name);
|
||||
for (const app of apps) {
|
||||
const service = this.getAppService(app);
|
||||
service.afterSessionStart(app, session);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,5 +23,7 @@ export interface IAppService {
|
||||
|
||||
beforeDeleted(app: App): Promise<void>;
|
||||
|
||||
beforeSessionStart(app: App, session: WhatsappSession): Promise<void>;
|
||||
beforeSessionStart(app: App, session: WhatsappSession): void;
|
||||
|
||||
afterSessionStart(app: App, session: WhatsappSession): void;
|
||||
}
|
||||
@@ -17,6 +17,8 @@ export interface IAppsService {
|
||||
|
||||
beforeSessionStart(session: WhatsappSession, store: DataStore): Promise<void>;
|
||||
|
||||
afterSessionStart(session: WhatsappSession, store: DataStore): Promise<void>;
|
||||
|
||||
migrate(knex: Knex): Promise<void>;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ import { ChatwootLocalesController } from '@waha/apps/chatwoot/api/chatwoot.loca
|
||||
import { ChatWootExports } from '@waha/apps/chatwoot/chatwoot.module';
|
||||
import { parseBool } from '@waha/helpers';
|
||||
import { RMutexModule } from '@waha/modules/rmutex';
|
||||
import { Auth } from '@waha/core/auth/config';
|
||||
|
||||
const IMPORTS = [
|
||||
BullModule.forRoot({
|
||||
@@ -93,11 +94,11 @@ const AppsDisabled = {
|
||||
};
|
||||
|
||||
function checkApiKey() {
|
||||
const key = process.env.WHATSAPP_API_KEY || process.env.WAHA_API_KEY;
|
||||
const key = Auth.key.value;
|
||||
if (!key) {
|
||||
return;
|
||||
}
|
||||
const plain = process.env.WAHA_API_KEY_PLAIN;
|
||||
const plain = Auth.keyplain.value;
|
||||
if (!plain) {
|
||||
throw Error(
|
||||
'WAHA_API_KEY set, please provide WAHA_API_KEY_PLAIN when WAHA_APPS_ENABLED',
|
||||
|
||||
@@ -81,6 +81,19 @@ export class ChatwootWebhookController {
|
||||
}
|
||||
return { success: true };
|
||||
case EventName.MESSAGE_UPDATED:
|
||||
// We handle only "retries" on message_update
|
||||
// This is the attribute ChatWoot send
|
||||
// There's NO other way to identify "status: read" updates right now
|
||||
// There's no "body.status" in message_updated webhook :(
|
||||
const isRetryNull = body.content_attributes?.external_error === null;
|
||||
const isRetrySomething = Boolean(
|
||||
body.content_attributes?.external_error,
|
||||
);
|
||||
const isRetry = isRetryNull || isRetrySomething;
|
||||
if (!isRetry) {
|
||||
return { success: true };
|
||||
}
|
||||
|
||||
if (!isCommandsChat) {
|
||||
await this.chatWootQueueService.addMessageUpdatedJob(data);
|
||||
} else {
|
||||
@@ -89,6 +102,7 @@ export class ChatwootWebhookController {
|
||||
return { success: true };
|
||||
default:
|
||||
// Ignore other events
|
||||
await this.chatWootQueueService.addJobToQueue(body.event, data);
|
||||
return { success: true };
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
import { public_conversation } from '@figuro/chatwoot-sdk';
|
||||
import { ChatWootAPIConfig } from '@waha/apps/chatwoot/client/interfaces';
|
||||
import * as NodeCache from 'node-cache';
|
||||
|
||||
import { IConversationCache } from './IConversationCache';
|
||||
import { ContactIds } from '@waha/apps/chatwoot/client/ConversationService';
|
||||
|
||||
const cache: NodeCache = new NodeCache({
|
||||
stdTTL: 24 * 60 * 60, // 1 day
|
||||
@@ -16,7 +16,7 @@ export function CacheForConfig(config: ChatWootAPIConfig): ConversationCache {
|
||||
class ConversationCache implements IConversationCache {
|
||||
constructor(private prefix: string) {}
|
||||
|
||||
fullKey(key: string) {
|
||||
private fullKey(key: string) {
|
||||
return `${this.prefix}.${key}`;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ class ConversationCache implements IConversationCache {
|
||||
cache.del(fullKey);
|
||||
}
|
||||
|
||||
get(key: string): public_conversation | null {
|
||||
get(key: string): ContactIds | null {
|
||||
const fullKey = this.fullKey(key);
|
||||
return cache.get(fullKey) || null;
|
||||
}
|
||||
@@ -35,7 +35,7 @@ class ConversationCache implements IConversationCache {
|
||||
return cache.has(fullKey);
|
||||
}
|
||||
|
||||
set(key: string, value: public_conversation): void {
|
||||
set(key: string, value: ContactIds): void {
|
||||
const fullKey = this.fullKey(key);
|
||||
cache.set(fullKey, value);
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
import { public_conversation } from '@figuro/chatwoot-sdk';
|
||||
import { ContactIds } from '@waha/apps/chatwoot/client/ConversationService';
|
||||
|
||||
export interface IConversationCache {
|
||||
get(key: string): public_conversation | null;
|
||||
set(key: string, value: public_conversation): void;
|
||||
get(key: string): ContactIds | null;
|
||||
set(key: string, value: ContactIds): void;
|
||||
has(key: string): boolean;
|
||||
delete(key: string): void;
|
||||
clean(): void;
|
||||
|
||||
@@ -21,10 +21,13 @@ import { WAHAMessageAnyConsumer } from './consumers/waha/message.any';
|
||||
import { WAHAMessageEditedConsumer } from './consumers/waha/message.edited';
|
||||
import { WAHAMessageReactionConsumer } from './consumers/waha/message.reaction';
|
||||
import { WAHAMessageRevokedConsumer } from './consumers/waha/message.revoked';
|
||||
import { WAHAMessageAckConsumer } from './consumers/waha/message.ack';
|
||||
import { WAHASessionStatusConsumer } from './consumers/waha/session.status';
|
||||
import { ChatWootQueueService } from './services/ChatWootQueueService';
|
||||
import { ChatWootScheduleService } from './services/ChatWootScheduleService';
|
||||
import { ChatWootWAHAQueueService } from './services/ChatWootWAHAQueueService';
|
||||
import { ChatWootConversationCreatedConsumer } from './consumers/inbox/conversation_created';
|
||||
import { ChatWootConversationStatusChangedConsumer } from '@waha/apps/chatwoot/consumers/inbox/conversation_status_changed';
|
||||
|
||||
const CONTROLLERS = [ChatwootWebhookController, ChatwootLocalesController];
|
||||
|
||||
@@ -53,6 +56,10 @@ const IMPORTS = lodash.flatten([
|
||||
name: QueueName.WAHA_MESSAGE_REVOKED,
|
||||
defaultJobOptions: merge(ExponentialRetriesJobOptions, JobRemoveOptions),
|
||||
}),
|
||||
RegisterAppQueue({
|
||||
name: QueueName.WAHA_MESSAGE_ACK,
|
||||
defaultJobOptions: merge(ExponentialRetriesJobOptions, JobRemoveOptions),
|
||||
}),
|
||||
RegisterAppQueue({
|
||||
name: QueueName.WAHA_SESSION_STATUS,
|
||||
defaultJobOptions: merge(ExponentialRetriesJobOptions, JobRemoveOptions),
|
||||
@@ -65,6 +72,14 @@ const IMPORTS = lodash.flatten([
|
||||
name: QueueName.INBOX_MESSAGE_UPDATED,
|
||||
defaultJobOptions: merge(ExponentialRetriesJobOptions, JobRemoveOptions),
|
||||
}),
|
||||
RegisterAppQueue({
|
||||
name: QueueName.INBOX_CONVERSATION_CREATED,
|
||||
defaultJobOptions: merge(NoRetriesJobOptions, JobRemoveOptions),
|
||||
}),
|
||||
RegisterAppQueue({
|
||||
name: QueueName.INBOX_CONVERSATION_STATUS_CHANGED,
|
||||
defaultJobOptions: merge(NoRetriesJobOptions, JobRemoveOptions),
|
||||
}),
|
||||
RegisterAppQueue({
|
||||
name: QueueName.INBOX_MESSAGE_DELETED,
|
||||
defaultJobOptions: merge(ExponentialRetriesJobOptions, JobRemoveOptions),
|
||||
@@ -79,12 +94,16 @@ const PROVIDERS = [
|
||||
ChatWootInboxMessageCreatedConsumer,
|
||||
ChatWootInboxMessageUpdatedConsumer,
|
||||
ChatWootInboxMessageDeletedConsumer,
|
||||
// Conversation events
|
||||
ChatWootConversationCreatedConsumer,
|
||||
ChatWootConversationStatusChangedConsumer,
|
||||
ChatWootInboxCommandsConsumer,
|
||||
WAHASessionStatusConsumer,
|
||||
WAHAMessageAnyConsumer,
|
||||
WAHAMessageReactionConsumer,
|
||||
WAHAMessageEditedConsumer,
|
||||
WAHAMessageRevokedConsumer,
|
||||
WAHAMessageAckConsumer,
|
||||
MessageCleanupConsumer,
|
||||
CheckVersionConsumer,
|
||||
ChatWootWAHAQueueService,
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
import axios from 'axios';
|
||||
|
||||
export class ChatWootInboxNewAPI {
|
||||
constructor(
|
||||
private base: string,
|
||||
private inboxIdentifier: string,
|
||||
) {}
|
||||
|
||||
async updateLastSeen(sourceId: string, conversationId: number) {
|
||||
// TODO: Move to the lib (fork?)
|
||||
// Call the update_last_seen endpoint using a direct HTTP request
|
||||
// since the SDK doesn't have this method
|
||||
const path = `/public/api/v1/inboxes/${this.inboxIdentifier}/contacts/${sourceId}/conversations/${conversationId}/update_last_seen`;
|
||||
const url = new URL(path, this.base).toString();
|
||||
await axios.post(
|
||||
url,
|
||||
{},
|
||||
{
|
||||
headers: {
|
||||
api_access_token: this.inboxIdentifier,
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,14 @@
|
||||
import ChatwootClient, {
|
||||
ApiError,
|
||||
ApiError as ChatWootAPIError,
|
||||
public_contact_create_update_payload,
|
||||
public_conversation,
|
||||
} from '@figuro/chatwoot-sdk';
|
||||
import { ILogger } from '@waha/apps/app_sdk/ILogger';
|
||||
import { ContactAPI } from '@waha/apps/chatwoot/client/ContactAPI';
|
||||
import { ContactService } from '@waha/apps/chatwoot/client/ContactService';
|
||||
import { Conversation } from '@waha/apps/chatwoot/client/Conversation';
|
||||
import { ConversationAPI } from '@waha/apps/chatwoot/client/ConversationAPI';
|
||||
import {
|
||||
ContactIds,
|
||||
ConversationService,
|
||||
} from '@waha/apps/chatwoot/client/ConversationService';
|
||||
import { ChatWootAPIConfig } from '@waha/apps/chatwoot/client/interfaces';
|
||||
import { InboxContactInfo } from '@waha/apps/chatwoot/contacts/InboxContactInfo';
|
||||
import { Locale } from '@waha/apps/chatwoot/i18n/locale';
|
||||
@@ -29,8 +31,8 @@ export class ContactConversationService {
|
||||
|
||||
constructor(
|
||||
private config: ChatWootAPIConfig,
|
||||
private contactAPI: ContactAPI,
|
||||
private conversationAPI: ConversationAPI,
|
||||
private contactService: ContactService,
|
||||
private conversationService: ConversationService,
|
||||
private accountAPI: ChatwootClient,
|
||||
private logger: ILogger,
|
||||
private l: Locale,
|
||||
@@ -40,7 +42,7 @@ export class ContactConversationService {
|
||||
|
||||
private async upsertByContactInfo(
|
||||
contactInfo: ContactInfo,
|
||||
): Promise<public_conversation> {
|
||||
): Promise<ContactIds> {
|
||||
const chatId = contactInfo.ChatId();
|
||||
|
||||
// Check cache for chat id
|
||||
@@ -51,61 +53,75 @@ export class ContactConversationService {
|
||||
//
|
||||
// Find or create contact
|
||||
//
|
||||
let contact = await this.contactAPI.searchByAnyID(chatId);
|
||||
let contact = await this.contactService.searchByAnyID(chatId);
|
||||
if (!contact) {
|
||||
const request = await contactInfo.PublicContactCreate();
|
||||
contact = await this.contactAPI.create(chatId, request);
|
||||
contact = await this.contactService.create(chatId, request);
|
||||
}
|
||||
|
||||
// Update custom attributes - always
|
||||
const attributes = await contactInfo.Attributes();
|
||||
this.logger.info(
|
||||
`Updating contact custom attributes for chat.id: ${chatId}, contact.id: ${contact.data.id}`,
|
||||
`Updating if required contact custom attributes for chat.id: ${chatId}, contact.id: ${contact.data.id}`,
|
||||
);
|
||||
await this.contactAPI.updateCustomAttributes(contact.data, attributes);
|
||||
await this.contactService.upsertCustomAttributes(contact.data, attributes);
|
||||
|
||||
// Update Avatar if nothing, but keep the original one if any
|
||||
if (!contact.data.thumbnail) {
|
||||
const avatarUrl = await contactInfo.AvatarUrl();
|
||||
const avatarUrl = await contactInfo.AvatarUrl().catch((err) => {
|
||||
this.logger.warn(
|
||||
`Error getting avatar for chat.id from WhatsApp: ${chatId}`,
|
||||
);
|
||||
this.logger.warn(err);
|
||||
return null;
|
||||
});
|
||||
if (avatarUrl) {
|
||||
this.contactAPI.updateAvatarUrlSafe(contact.data.id, avatarUrl);
|
||||
this.contactService.updateAvatarUrlSafe(contact.data.id, avatarUrl);
|
||||
}
|
||||
}
|
||||
|
||||
this.logger.info(
|
||||
`Using contact for chat.id: ${chatId}, contact.id: ${contact.sourceId}`,
|
||||
`Using contact for chat.id: ${chatId}, contact.id: ${contact.data.id}, contact.sourceId: ${contact.sourceId}`,
|
||||
);
|
||||
|
||||
//
|
||||
// Get or create a conversation for this inbox
|
||||
//
|
||||
const conversation = await this.conversationAPI.upsert(contact.sourceId);
|
||||
const conversation = await this.conversationService.upsert({
|
||||
id: contact.data.id,
|
||||
sourceId: contact.sourceId,
|
||||
});
|
||||
this.logger.info(
|
||||
`Using conversation for chat.id: ${chatId}, conversation.id: ${conversation.id}, contact.id: ${contact.sourceId}`,
|
||||
);
|
||||
|
||||
// Save to cache
|
||||
this.cache.set(chatId, conversation);
|
||||
return conversation;
|
||||
const ids = {
|
||||
id: conversation.id,
|
||||
sourceId: contact.sourceId,
|
||||
};
|
||||
this.cache.set(chatId, ids);
|
||||
return ids;
|
||||
}
|
||||
|
||||
public async ConversationByContact(
|
||||
contactInfo: ContactInfo,
|
||||
): Promise<Conversation> {
|
||||
const chatId = contactInfo.ChatId();
|
||||
const publicConversation = await this.upsertByContactInfo(contactInfo);
|
||||
const ids = await this.upsertByContactInfo(contactInfo);
|
||||
const conversation = new Conversation(
|
||||
this.accountAPI,
|
||||
this.config.accountId,
|
||||
publicConversation.id,
|
||||
ids.id,
|
||||
ids.sourceId,
|
||||
);
|
||||
conversation.onError = (err) => {
|
||||
if (err instanceof ApiError) {
|
||||
if (err instanceof ChatWootAPIError) {
|
||||
// invalidate cache
|
||||
this.cache.delete(chatId);
|
||||
this.logger.error(`ApiError: ${err.message}`);
|
||||
this.logger.error(
|
||||
`ApiError occurred, invalidating cache for chat.id: ${chatId}, conversation.id: ${publicConversation.id}`,
|
||||
`ApiError occurred, invalidating cache for chat.id: ${chatId}, conversation.id: ${ids.id}, source.id: ${ids.sourceId}`,
|
||||
);
|
||||
}
|
||||
};
|
||||
@@ -127,4 +143,33 @@ export class ContactConversationService {
|
||||
public async InboxNotifications() {
|
||||
return this.ConversationByContact(new InboxContactInfo(this.l));
|
||||
}
|
||||
|
||||
public ResetCache(chatIds: Array<string>) {
|
||||
this.logger.info(`Resetting cache chat ids: ${chatIds.join(', ')}`);
|
||||
for (const chatId of chatIds) {
|
||||
this.cache.delete(chatId);
|
||||
}
|
||||
}
|
||||
|
||||
public ResetMismatchedCache(chatIds: Array<string>, contactId: number) {
|
||||
for (const chatId of chatIds) {
|
||||
if (!this.cache.has(chatId)) {
|
||||
continue;
|
||||
}
|
||||
const current = this.cache.get(chatId);
|
||||
if (current.id !== contactId) {
|
||||
this.logger.info(
|
||||
`Resetting cache for chat id: ${chatId}, value changed from ${current} to ${contactId}`,
|
||||
);
|
||||
this.cache.delete(chatId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public async markConversationAsRead(
|
||||
conversationId: number,
|
||||
sourceId: string,
|
||||
): Promise<void> {
|
||||
await this.conversationService.markAsRead(conversationId, sourceId);
|
||||
}
|
||||
}
|
||||
+12
-7
@@ -13,13 +13,14 @@ import { isJidCusFormat } from '@waha/utils/wa';
|
||||
import * as lodash from 'lodash';
|
||||
|
||||
import { AttributeKey } from '../const';
|
||||
import { E164Parser } from '@waha/core/utils/PhoneJidNormalizer';
|
||||
|
||||
export interface ContactResponse {
|
||||
data: generic_id & contact;
|
||||
sourceId: string;
|
||||
}
|
||||
|
||||
export class ContactAPI {
|
||||
export class ContactService {
|
||||
constructor(
|
||||
private config: ChatWootAPIConfig,
|
||||
private accountAPI: ChatwootClient,
|
||||
@@ -64,8 +65,8 @@ export class ContactAPI {
|
||||
|
||||
if (isJidCusFormat(chatId)) {
|
||||
// Search by phone
|
||||
let phone_number = chatId.split('@')[0];
|
||||
phone_number = phone_number.replace('+', '');
|
||||
const phoneNumberE164 = E164Parser.fromJid(chatId);
|
||||
const phone_number = phoneNumberE164.replace('+', '');
|
||||
payload[payload.length - 1].query_operator = 'OR';
|
||||
payload.push({
|
||||
attribute_key: 'phone_number',
|
||||
@@ -96,18 +97,22 @@ export class ContactAPI {
|
||||
};
|
||||
}
|
||||
|
||||
public updateCustomAttributes(
|
||||
public async upsertCustomAttributes(
|
||||
contact: generic_id & contact,
|
||||
attributes: any,
|
||||
) {
|
||||
): Promise<boolean> {
|
||||
if (lodash.isEqual(attributes, contact.custom_attributes)) {
|
||||
return false;
|
||||
}
|
||||
const update: contact_update = {
|
||||
custom_attributes: { ...contact.custom_attributes, ...attributes },
|
||||
};
|
||||
return this.accountAPI.contacts.update({
|
||||
await this.accountAPI.contacts.update({
|
||||
id: contact.id,
|
||||
accountId: this.config.accountId,
|
||||
data: update,
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
public async create(
|
||||
@@ -142,7 +147,7 @@ export class ContactAPI {
|
||||
})
|
||||
.catch((e) => {
|
||||
this.logger.warn(
|
||||
'Error updating avatar_url for contact.id: ' + contactId,
|
||||
`Error updating avatar_url for contact.id: ${contactId}`,
|
||||
);
|
||||
this.logger.warn(e);
|
||||
});
|
||||
@@ -9,6 +9,7 @@ export class Conversation {
|
||||
private accountAPI: ChatwootClient,
|
||||
private accountId: number,
|
||||
public conversationId: number,
|
||||
public sourceId: string | null = null,
|
||||
) {}
|
||||
|
||||
public async send(data: conversation_message_create) {
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
import { public_conversation } from '@figuro/chatwoot-sdk';
|
||||
import { ILogger } from '@waha/apps/app_sdk/ILogger';
|
||||
import {
|
||||
ChatWootAPIConfig,
|
||||
ChatWootInboxAPI,
|
||||
} from '@waha/apps/chatwoot/client/interfaces';
|
||||
|
||||
export class ConversationAPI {
|
||||
constructor(
|
||||
private config: ChatWootAPIConfig,
|
||||
private inboxAPI: ChatWootInboxAPI,
|
||||
private logger: ILogger,
|
||||
) {}
|
||||
|
||||
private async find(
|
||||
contactIdentifier: string,
|
||||
): Promise<public_conversation | null> {
|
||||
const request = {
|
||||
inboxIdentifier: this.config.inboxIdentifier,
|
||||
contactIdentifier: contactIdentifier,
|
||||
};
|
||||
const conversations = await this.inboxAPI.conversations.list(request);
|
||||
if (conversations.length != 0) {
|
||||
return conversations[0];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private async create(
|
||||
contactIdentifier: string,
|
||||
): Promise<public_conversation> {
|
||||
const conversation = await this.inboxAPI.conversations.create({
|
||||
inboxIdentifier: this.config.inboxIdentifier,
|
||||
contactIdentifier: contactIdentifier,
|
||||
});
|
||||
this.logger.info(
|
||||
`Created conversation.id: ${conversation.id} for contact.id: ${contactIdentifier}`,
|
||||
);
|
||||
return conversation;
|
||||
}
|
||||
|
||||
async upsert(contactIdentifier: string): Promise<public_conversation> {
|
||||
let conversation = await this.find(contactIdentifier);
|
||||
if (!conversation) {
|
||||
conversation = await this.create(contactIdentifier);
|
||||
}
|
||||
this.logger.info(
|
||||
`Using conversation.id: ${conversation.id} for contact.id: ${contactIdentifier}`,
|
||||
);
|
||||
return conversation;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
import ChatwootClient, { contact_conversations } from '@figuro/chatwoot-sdk';
|
||||
import { ILogger } from '@waha/apps/app_sdk/ILogger';
|
||||
import {
|
||||
ChatWootAPIConfig,
|
||||
ChatWootInboxAPI,
|
||||
} from '@waha/apps/chatwoot/client/interfaces';
|
||||
import type { conversation } from '@figuro/chatwoot-sdk/dist/models/conversation';
|
||||
import { ConversationSelector } from '@waha/apps/chatwoot/services/ConversationSelector';
|
||||
import axios from 'axios';
|
||||
import { ChatWootInboxNewAPI } from '@waha/apps/chatwoot/client/ChatWootInboxNewAPI';
|
||||
|
||||
export type ConversationResult = Pick<conversation, 'id' | 'account_id'>;
|
||||
|
||||
export interface ContactIds {
|
||||
id: number;
|
||||
sourceId: string;
|
||||
}
|
||||
|
||||
export class ConversationService {
|
||||
constructor(
|
||||
private config: ChatWootAPIConfig,
|
||||
private accountAPI: ChatwootClient,
|
||||
private inboxAPI: ChatWootInboxAPI,
|
||||
private selector: ConversationSelector,
|
||||
private logger: ILogger,
|
||||
) {}
|
||||
|
||||
private async find(contact: ContactIds): Promise<ConversationResult | null> {
|
||||
const result: { payload: contact_conversations } =
|
||||
(await this.accountAPI.contacts.listConversations({
|
||||
accountId: this.config.accountId,
|
||||
id: contact.id,
|
||||
})) as any;
|
||||
const conversations = result.payload;
|
||||
return this.selector.select(conversations);
|
||||
}
|
||||
|
||||
private async create(contact: ContactIds): Promise<ConversationResult> {
|
||||
const conversation = await this.inboxAPI.conversations.create({
|
||||
inboxIdentifier: this.config.inboxIdentifier,
|
||||
contactIdentifier: contact.sourceId,
|
||||
});
|
||||
this.logger.info(
|
||||
`Created conversation.id: ${conversation.id} for contact.id: ${contact.id}, contact.sourceId: ${contact.sourceId}`,
|
||||
);
|
||||
return conversation;
|
||||
}
|
||||
|
||||
async upsert(contact: ContactIds): Promise<ConversationResult> {
|
||||
let conversation = await this.find(contact);
|
||||
if (!conversation) {
|
||||
conversation = await this.create(contact);
|
||||
}
|
||||
this.logger.info(
|
||||
`Using conversation.id: ${conversation.id} for contact.id: ${contact.id}, contact.sourceId: ${contact.sourceId}`,
|
||||
);
|
||||
return conversation;
|
||||
}
|
||||
|
||||
async markAsRead(conversationId: number, sourceId: string): Promise<void> {
|
||||
try {
|
||||
const inboxNewAPI = new ChatWootInboxNewAPI(
|
||||
this.config.url,
|
||||
this.config.inboxIdentifier,
|
||||
);
|
||||
await inboxNewAPI.updateLastSeen(sourceId, conversationId);
|
||||
this.logger.info(
|
||||
`Marked conversation.id: ${conversationId} as read in inbox: ${this.config.inboxIdentifier} for contact: ${sourceId}`,
|
||||
);
|
||||
} catch (error) {
|
||||
const reason = error instanceof Error ? error.message : String(error);
|
||||
this.logger.error(
|
||||
`Error marking conversation.id: ${conversationId} as read: ${reason}`,
|
||||
);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
import ChatwootClient from '@figuro/chatwoot-sdk';
|
||||
import { ChatWootAccountAPIConfig } from '@waha/apps/chatwoot/client/interfaces';
|
||||
import {
|
||||
CustomAttributeModel,
|
||||
CustomAttributeType,
|
||||
} from '@waha/apps/chatwoot/client/types';
|
||||
|
||||
export interface CustomAttribute {
|
||||
key: string;
|
||||
name: string;
|
||||
type: CustomAttributeType;
|
||||
description: string;
|
||||
model: CustomAttributeModel;
|
||||
}
|
||||
|
||||
export class CustomAttributesAPI {
|
||||
constructor(
|
||||
private config: ChatWootAccountAPIConfig,
|
||||
private accountAPI: ChatwootClient,
|
||||
) {}
|
||||
|
||||
async upsert(attribute: CustomAttribute): Promise<void> {
|
||||
const attributes = await this.accountAPI.customAttributes.list({
|
||||
accountId: this.config.accountId,
|
||||
attributeModel: String(attribute.model) as '0' | '1',
|
||||
});
|
||||
const existing = attributes.find((a) => a.attribute_key === attribute.key);
|
||||
|
||||
if (existing) {
|
||||
await this.accountAPI.customAttributes.update({
|
||||
accountId: this.config.accountId,
|
||||
id: existing.id,
|
||||
data: {
|
||||
attribute_key: attribute.key,
|
||||
attribute_display_name: attribute.name,
|
||||
attribute_display_type: attribute.type,
|
||||
attribute_description: attribute.description,
|
||||
},
|
||||
});
|
||||
} else {
|
||||
await this.accountAPI.customAttributes.create({
|
||||
accountId: this.config.accountId,
|
||||
data: {
|
||||
attribute_key: attribute.key,
|
||||
attribute_display_name: attribute.name,
|
||||
attribute_display_type: attribute.type,
|
||||
attribute_description: attribute.description,
|
||||
attribute_model: attribute.model,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
import ChatwootClient from '@figuro/chatwoot-sdk';
|
||||
import { ChatWootAccountAPIConfig } from '@waha/apps/chatwoot/client/interfaces';
|
||||
import {
|
||||
CustomAttributeModel,
|
||||
CustomAttributeType,
|
||||
} from '@waha/apps/chatwoot/client/types';
|
||||
import type { custom_attribute } from '@figuro/chatwoot-sdk/dist/models/custom_attribute';
|
||||
|
||||
export interface CustomAttribute {
|
||||
key: string;
|
||||
name: string;
|
||||
type: CustomAttributeType;
|
||||
description: string;
|
||||
model: CustomAttributeModel;
|
||||
}
|
||||
|
||||
export class CustomAttributesService {
|
||||
constructor(
|
||||
private config: ChatWootAccountAPIConfig,
|
||||
private accountAPI: ChatwootClient,
|
||||
) {}
|
||||
|
||||
async upsert(attributes: Array<CustomAttribute>): Promise<void> {
|
||||
const current: Record<CustomAttributeModel, Array<custom_attribute>> = {
|
||||
[CustomAttributeModel.CONVERSATION]: [],
|
||||
[CustomAttributeModel.CONTACT]: [],
|
||||
};
|
||||
const models = [
|
||||
CustomAttributeModel.CONVERSATION,
|
||||
CustomAttributeModel.CONTACT,
|
||||
];
|
||||
for (const model of models) {
|
||||
current[model] = await this.accountAPI.customAttributes.list({
|
||||
accountId: this.config.accountId,
|
||||
attributeModel: String(model) as '0' | '1',
|
||||
});
|
||||
}
|
||||
|
||||
for (const attribute of attributes) {
|
||||
const existing = current[attribute.model].find(
|
||||
(a) => a.attribute_key === attribute.key,
|
||||
);
|
||||
if (existing) {
|
||||
await this.accountAPI.customAttributes.update({
|
||||
accountId: this.config.accountId,
|
||||
id: existing.id,
|
||||
data: {
|
||||
attribute_key: attribute.key,
|
||||
attribute_display_name: attribute.name,
|
||||
attribute_display_type: attribute.type,
|
||||
attribute_description: attribute.description,
|
||||
},
|
||||
});
|
||||
} else {
|
||||
await this.accountAPI.customAttributes.create({
|
||||
accountId: this.config.accountId,
|
||||
data: {
|
||||
attribute_key: attribute.key,
|
||||
attribute_display_name: attribute.name,
|
||||
attribute_display_type: attribute.type,
|
||||
attribute_description: attribute.description,
|
||||
attribute_model: attribute.model,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
import { isLidUser } from '@adiwajshing/baileys/lib/WABinary/jid-utils';
|
||||
import { AttributeKey } from '@waha/apps/chatwoot/const';
|
||||
import { WhatsAppMessage } from '@waha/apps/chatwoot/storage';
|
||||
import { buildMessageId } from '@waha/core/engines/noweb/session.noweb.core';
|
||||
import { isLidUser } from '@waha/core/utils/jids';
|
||||
|
||||
export function GetJID(contact: any): string | null {
|
||||
return contact?.custom_attributes?.[AttributeKey.WA_JID];
|
||||
@@ -15,6 +15,16 @@ export function GetChatID(contact: any): string | null {
|
||||
return contact?.custom_attributes?.[AttributeKey.WA_CHAT_ID];
|
||||
}
|
||||
|
||||
export function GetAllChatIDs(contact: any): Array<string> {
|
||||
const attrs = contact?.custom_attributes || {};
|
||||
const ids = [
|
||||
attrs[AttributeKey.WA_CHAT_ID],
|
||||
attrs[AttributeKey.WA_JID],
|
||||
attrs[AttributeKey.WA_LID],
|
||||
];
|
||||
return ids.filter(Boolean);
|
||||
}
|
||||
|
||||
export function FindChatID(contact: any): string | null {
|
||||
if (GetJID(contact)) {
|
||||
return GetJID(contact);
|
||||
|
||||
@@ -51,3 +51,10 @@ export enum CustomAttributeModel {
|
||||
CONVERSATION = 0,
|
||||
CONTACT = 1,
|
||||
}
|
||||
|
||||
export enum ConversationStatus {
|
||||
OPEN = 'open',
|
||||
PENDING = 'pending',
|
||||
SNOOZED = 'snoozed',
|
||||
RESOLVED = 'resolved',
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { CustomAttribute } from '@waha/apps/chatwoot/client/CustomAttributesAPI';
|
||||
import { CustomAttribute } from '@waha/apps/chatwoot/client/CustomAttributesService';
|
||||
|
||||
import { CustomAttributeModel, CustomAttributeType } from './client/types';
|
||||
|
||||
|
||||
@@ -13,11 +13,14 @@ export enum QueueName {
|
||||
WAHA_MESSAGE_REACTION = 'chatwoot.waha | message.reaction',
|
||||
WAHA_MESSAGE_EDITED = 'chatwoot.waha | message.edited',
|
||||
WAHA_MESSAGE_REVOKED = 'chatwoot.waha | message.revoked',
|
||||
WAHA_MESSAGE_ACK = 'chatwoot.waha | message.ack',
|
||||
//
|
||||
// ChatWoot Events - Real
|
||||
//
|
||||
INBOX_MESSAGE_CREATED = 'chatwoot.inbox | message_created',
|
||||
INBOX_MESSAGE_UPDATED = 'chatwoot.inbox | message_updated',
|
||||
INBOX_CONVERSATION_CREATED = 'chatwoot.inbox | conversation_created',
|
||||
INBOX_CONVERSATION_STATUS_CHANGED = 'chatwoot.inbox | conversation_status_changed',
|
||||
//
|
||||
// ChatWoot Events - Artificial
|
||||
//
|
||||
|
||||
@@ -58,13 +58,20 @@ export abstract class ChatWootInboxMessageConsumer extends AppConsumer {
|
||||
job: Job,
|
||||
): Promise<any>;
|
||||
|
||||
protected GetConversationID(body) {
|
||||
return body.conversation.id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Process the job
|
||||
* This method is called by the queue processor
|
||||
*/
|
||||
async processJob(job: Job<InboxData, any, EventName>): Promise<any> {
|
||||
const body = job.data.body;
|
||||
const key = ChatWootConversationKey(job.data.app, body.conversation.id);
|
||||
const key = ChatWootConversationKey(
|
||||
job.data.app,
|
||||
this.GetConversationID(body),
|
||||
);
|
||||
return await this.withMutex(job, key, () =>
|
||||
this.ProcessAndReportStatus(job),
|
||||
);
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
import { Processor } from '@nestjs/bullmq';
|
||||
import { JOB_CONCURRENCY } from '@waha/apps/app_sdk/constants';
|
||||
import { QueueName } from '@waha/apps/chatwoot/consumers/QueueName';
|
||||
import { ChatWootConversationKey } from '@waha/apps/chatwoot/consumers/mutex';
|
||||
import { ChatWootInboxMessageConsumer } from '@waha/apps/chatwoot/consumers/inbox/base';
|
||||
import { InboxData } from '@waha/apps/chatwoot/consumers/types';
|
||||
import { Job } from 'bullmq';
|
||||
import { GetAllChatIDs } from '@waha/apps/chatwoot/client/ids';
|
||||
import { DIContainer } from '@waha/apps/chatwoot/di/DIContainer';
|
||||
import { TKey } from '@waha/apps/chatwoot/i18n/templates';
|
||||
import { ContactConversationService } from '@waha/apps/chatwoot/client/ContactConversationService';
|
||||
import { SessionManager } from '@waha/core/abc/manager.abc';
|
||||
import { PinoLogger } from 'nestjs-pino';
|
||||
import { RMutexService } from '@waha/modules/rmutex';
|
||||
|
||||
@Processor(QueueName.INBOX_CONVERSATION_CREATED, {
|
||||
concurrency: JOB_CONCURRENCY,
|
||||
})
|
||||
export class ChatWootConversationCreatedConsumer extends ChatWootInboxMessageConsumer {
|
||||
constructor(
|
||||
protected readonly manager: SessionManager,
|
||||
log: PinoLogger,
|
||||
rmutex: RMutexService,
|
||||
) {
|
||||
super(manager, log, rmutex, 'ChatWootConversationCreatedConsumer');
|
||||
}
|
||||
protected ErrorHeaderKey(): TKey | null {
|
||||
return null;
|
||||
}
|
||||
|
||||
protected GetConversationID(body) {
|
||||
return body.id;
|
||||
}
|
||||
|
||||
protected async Process(
|
||||
container: DIContainer,
|
||||
body: any,
|
||||
job: Job,
|
||||
): Promise<any> {
|
||||
const handler = new ConversationCreatedHandler(
|
||||
container.ContactConversationService(),
|
||||
);
|
||||
return handler.handle(body);
|
||||
}
|
||||
}
|
||||
|
||||
class ConversationCreatedHandler {
|
||||
constructor(private service: ContactConversationService) {}
|
||||
|
||||
async handle(body: any) {
|
||||
const ids = GetAllChatIDs(body?.meta?.sender);
|
||||
if (!ids || ids.length === 0) {
|
||||
return;
|
||||
}
|
||||
this.service.ResetMismatchedCache(ids, body.id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
import { Processor } from '@nestjs/bullmq';
|
||||
import { JOB_CONCURRENCY } from '@waha/apps/app_sdk/constants';
|
||||
import { QueueName } from '@waha/apps/chatwoot/consumers/QueueName';
|
||||
import { ChatWootInboxMessageConsumer } from '@waha/apps/chatwoot/consumers/inbox/base';
|
||||
import { Job } from 'bullmq';
|
||||
import { DIContainer } from '../../di/DIContainer';
|
||||
import { TKey } from '../../i18n/templates';
|
||||
import { ContactConversationService } from '@waha/apps/chatwoot/client/ContactConversationService';
|
||||
import { AttributeKey } from '@waha/apps/chatwoot/const';
|
||||
import { ConversationSelector } from '@waha/apps/chatwoot/services/ConversationSelector';
|
||||
import { GetAllChatIDs } from '@waha/apps/chatwoot/client/ids';
|
||||
import { SessionManager } from '@waha/core/abc/manager.abc';
|
||||
import { PinoLogger } from 'nestjs-pino';
|
||||
import { RMutexService } from '@waha/modules/rmutex';
|
||||
|
||||
@Processor(QueueName.INBOX_CONVERSATION_STATUS_CHANGED, {
|
||||
concurrency: JOB_CONCURRENCY,
|
||||
})
|
||||
export class ChatWootConversationStatusChangedConsumer extends ChatWootInboxMessageConsumer {
|
||||
constructor(
|
||||
protected readonly manager: SessionManager,
|
||||
log: PinoLogger,
|
||||
rmutex: RMutexService,
|
||||
) {
|
||||
super(manager, log, rmutex, 'ChatWootConversationStatusChangedConsumer');
|
||||
}
|
||||
|
||||
protected ErrorHeaderKey(): TKey | null {
|
||||
return null;
|
||||
}
|
||||
|
||||
protected GetConversationID(body) {
|
||||
return body.id;
|
||||
}
|
||||
|
||||
protected async Process(
|
||||
container: DIContainer,
|
||||
body: any,
|
||||
job: Job,
|
||||
): Promise<any> {
|
||||
const handler = new ConversationStatusChangedHandler(
|
||||
container.ContactConversationService(),
|
||||
container.ConversationSelector(),
|
||||
);
|
||||
return await handler.handle(body);
|
||||
}
|
||||
}
|
||||
|
||||
class ConversationStatusChangedHandler {
|
||||
constructor(
|
||||
private service: ContactConversationService,
|
||||
private selector: ConversationSelector,
|
||||
) {}
|
||||
|
||||
async handle(body) {
|
||||
if (!this.selector.hasStatusFilter()) {
|
||||
return;
|
||||
}
|
||||
const ids = GetAllChatIDs(body.meta?.sender);
|
||||
this.service.ResetCache(ids);
|
||||
}
|
||||
}
|
||||
@@ -12,9 +12,10 @@ import { EngineHelper } from '@waha/apps/chatwoot/session';
|
||||
import { WAHASessionAPI } from '@waha/apps/chatwoot/session/WAHASelf';
|
||||
import {
|
||||
ChatwootMessage,
|
||||
MessageMapping,
|
||||
MessageMappingService,
|
||||
} from '@waha/apps/chatwoot/storage';
|
||||
import { MarkdownToWhatsApp } from '@waha/apps/chatwoot/text';
|
||||
import { MarkdownToWhatsApp } from '@waha/apps/chatwoot/messages/to/whatsapp/markdown';
|
||||
import { SessionManager } from '@waha/core/abc/manager.abc';
|
||||
import { RMutexService } from '@waha/modules/rmutex/rmutex.service';
|
||||
import {
|
||||
@@ -79,7 +80,10 @@ export class MessageHandler {
|
||||
async handle(body: any) {
|
||||
const chatId = await LookupAndCheckChatId(this.session, body);
|
||||
const message = body;
|
||||
if (message.content_type != 'text') {
|
||||
if (
|
||||
message.content_type != 'text' &&
|
||||
message.content_type != 'input_csat'
|
||||
) {
|
||||
this.logger.info(
|
||||
`Message content type not supported. Content type: ${message.content_type}`,
|
||||
);
|
||||
@@ -88,29 +92,48 @@ export class MessageHandler {
|
||||
|
||||
const content = MarkdownToWhatsApp(message.content);
|
||||
const results = [];
|
||||
let part = 1;
|
||||
let part = 0; // Start from 0 and increment before each send/check
|
||||
const replyTo = await this.getReplyTo(message).catch((err) => {
|
||||
this.logger.error(`Error getting reply to message ID: ${err}`);
|
||||
this.logger.error(
|
||||
`ChatWoot => WhatsApp: error getting reply to message ID: ${err}`,
|
||||
);
|
||||
return undefined;
|
||||
});
|
||||
|
||||
// Send text
|
||||
// Send text (Part 1 if present)
|
||||
const attachments = message.attachments || [];
|
||||
if (content && attachments.length !== 1) {
|
||||
const textTemplate = this.l.key(TKey.CW_TO_WA_MESSAGE_TEXT);
|
||||
const text = textTemplate.render({
|
||||
content: content,
|
||||
chatwoot: body,
|
||||
});
|
||||
const msg = await this.sendTextMessage(chatId, text, replyTo);
|
||||
results.push(msg);
|
||||
part = await this.saveMapping(message, msg, part);
|
||||
this.logger.info(`Text message sent: ${msg.id}`);
|
||||
const sendText = content && attachments.length !== 1;
|
||||
if (sendText) {
|
||||
part += 1; // Text is the first possible part
|
||||
const exists = await this.getMapping(message, part);
|
||||
if (exists) {
|
||||
this.logger.warn(
|
||||
`Skip part ${part}: mapping exists for Chatwoot message ${message.id}`,
|
||||
);
|
||||
} else {
|
||||
const textTemplate = this.l.key(TKey.CW_TO_WA_MESSAGE_TEXT);
|
||||
const text = textTemplate.render({
|
||||
content: content,
|
||||
chatwoot: body,
|
||||
});
|
||||
const msg = await this.sendTextMessage(chatId, text, replyTo);
|
||||
results.push(msg);
|
||||
await this.saveMapping(message, msg, part);
|
||||
this.logger.info(`Text message sent: ${msg.id}`);
|
||||
}
|
||||
}
|
||||
|
||||
// Send files
|
||||
const captionTemplate = this.l.key(TKey.CW_TO_WA_MESSAGE_MEDIA_CAPTION);
|
||||
for (const file of attachments) {
|
||||
part += 1; // Increment before each attachment send/check
|
||||
const exists = await this.getMapping(message, part);
|
||||
if (exists) {
|
||||
this.logger.warn(
|
||||
`Skip part ${part}: mapping exists for Chatwoot message ${message.id}`,
|
||||
);
|
||||
continue;
|
||||
}
|
||||
const caption = captionTemplate.render({
|
||||
content: content,
|
||||
chatwoot: body,
|
||||
@@ -121,7 +144,7 @@ export class MessageHandler {
|
||||
`File message sent: ${msg.id} - ${file.data_url} - ${file.file_type}`,
|
||||
);
|
||||
results.push(msg);
|
||||
part = await this.saveMapping(message, msg, part);
|
||||
await this.saveMapping(message, msg, part);
|
||||
}
|
||||
return results;
|
||||
}
|
||||
@@ -130,15 +153,27 @@ export class MessageHandler {
|
||||
chatwootMessage: any,
|
||||
whatsappMessage: any,
|
||||
part: number,
|
||||
): Promise<number> {
|
||||
): Promise<void> {
|
||||
const chatwoot: Omit<ChatwootMessage, 'id'> = {
|
||||
timestamp: new Date(chatwootMessage.created_at),
|
||||
conversation_id: chatwootMessage.conversation.id,
|
||||
message_id: chatwootMessage.id,
|
||||
};
|
||||
const whatsapp = EngineHelper.WhatsAppMessageKeys(whatsappMessage);
|
||||
await this.mappingService.map(chatwoot, whatsapp, 1);
|
||||
return part + 1;
|
||||
await this.mappingService.map(chatwoot, whatsapp, part);
|
||||
}
|
||||
|
||||
private async getMapping(
|
||||
message: any,
|
||||
part: number,
|
||||
): Promise<MessageMapping | null> {
|
||||
return this.mappingService.getMappingByChatwootCombinedKeyAndPart(
|
||||
{
|
||||
conversation_id: message.conversation.id,
|
||||
message_id: message.id,
|
||||
},
|
||||
part,
|
||||
);
|
||||
}
|
||||
|
||||
async getReplyTo(message): Promise<string | undefined> {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { isJidGroup, isJidStatusBroadcast } from '@adiwajshing/baileys';
|
||||
import { conversation_message_create } from '@figuro/chatwoot-sdk';
|
||||
import type { generic_id } from '@figuro/chatwoot-sdk/dist/models/generic_id';
|
||||
import type { message } from '@figuro/chatwoot-sdk/dist/models/message';
|
||||
@@ -22,7 +21,6 @@ import {
|
||||
WhatsAppMessage,
|
||||
} from '@waha/apps/chatwoot/storage';
|
||||
import { SessionManager } from '@waha/core/abc/manager.abc';
|
||||
import { toCusFormat } from '@waha/core/engines/noweb/session.noweb.core';
|
||||
import { parseMessageIdSerialized } from '@waha/core/utils/ids';
|
||||
import { RMutexService } from '@waha/modules/rmutex/rmutex.service';
|
||||
import { WAHAEvents } from '@waha/structures/enums.dto';
|
||||
@@ -36,7 +34,7 @@ import { Job } from 'bullmq';
|
||||
import { PinoLogger } from 'nestjs-pino';
|
||||
|
||||
import { TKey } from '@waha/apps/chatwoot/i18n/templates';
|
||||
import { isJidBroadcast } from '@adiwajshing/baileys/lib/WABinary/jid-utils';
|
||||
import { isJidBroadcast, isJidGroup, toCusFormat } from '@waha/core/utils/jids';
|
||||
|
||||
export function ListenEventsForChatWoot() {
|
||||
return [
|
||||
@@ -44,6 +42,7 @@ export function ListenEventsForChatWoot() {
|
||||
WAHAEvents.MESSAGE_REACTION,
|
||||
WAHAEvents.MESSAGE_EDITED,
|
||||
WAHAEvents.MESSAGE_REVOKED,
|
||||
WAHAEvents.MESSAGE_ACK,
|
||||
WAHAEvents.SESSION_STATUS,
|
||||
];
|
||||
}
|
||||
@@ -98,8 +97,15 @@ export abstract class ChatWootWAHABaseConsumer extends AppConsumer {
|
||||
messageInfo: IMessageInfo,
|
||||
): Promise<any>;
|
||||
|
||||
ShouldProcess(event: any): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
async processJob(job: Job<EventData, any, WAHAEvents>): Promise<any> {
|
||||
const event: WAHAWebhookMessageRevoked = job.data.event as any;
|
||||
const event = job.data.event as any;
|
||||
if (!this.ShouldProcess(event)) {
|
||||
return;
|
||||
}
|
||||
const key = WhatsAppChatIdKey(job.data.app, this.GetChatId(event));
|
||||
return await this.withMutex(job, key, () =>
|
||||
this.ProcessAndReportErrors(job),
|
||||
@@ -152,7 +158,7 @@ export abstract class ChatWootWAHABaseConsumer extends AppConsumer {
|
||||
.ContactConversationService()
|
||||
.ConversationById(info.conversationId);
|
||||
} else {
|
||||
const conversation = await container
|
||||
conversation = await container
|
||||
.ContactConversationService()
|
||||
.InboxNotifications();
|
||||
}
|
||||
@@ -301,7 +307,9 @@ export abstract class MessageBaseHandler<Payload extends WAMessageBase> {
|
||||
}
|
||||
const replyTo = await this.getReplyToChatWootMessageID(payload).catch(
|
||||
(err) => {
|
||||
this.logger.error(`Error getting reply to message ID: ${err}`);
|
||||
this.logger.error(
|
||||
`WhatsApp => ChatWoot - error getting reply to message ID: ${err}`,
|
||||
);
|
||||
return undefined;
|
||||
},
|
||||
);
|
||||
@@ -329,6 +337,6 @@ export abstract class MessageBaseHandler<Payload extends WAMessageBase> {
|
||||
chat_id: payload.from,
|
||||
message_id: replyToWhatsAppID,
|
||||
});
|
||||
return chatwoot.message_id;
|
||||
return chatwoot?.message_id;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
import { Processor } from '@nestjs/bullmq';
|
||||
import { ILogger } from '@waha/apps/app_sdk/ILogger';
|
||||
import { JOB_CONCURRENCY } from '@waha/apps/app_sdk/constants';
|
||||
import { ContactConversationService } from '@waha/apps/chatwoot/client/ContactConversationService';
|
||||
import { QueueName } from '@waha/apps/chatwoot/consumers/QueueName';
|
||||
import { EventData } from '@waha/apps/chatwoot/consumers/types';
|
||||
import {
|
||||
ChatWootWAHABaseConsumer,
|
||||
IMessageInfo,
|
||||
} from '@waha/apps/chatwoot/consumers/waha/base';
|
||||
import { WhatsAppContactInfo } from '@waha/apps/chatwoot/contacts/WhatsAppContactInfo';
|
||||
import { Locale } from '@waha/apps/chatwoot/i18n/locale';
|
||||
import { WAHASessionAPI } from '@waha/apps/chatwoot/session/WAHASelf';
|
||||
import { SessionManager } from '@waha/core/abc/manager.abc';
|
||||
import { RMutexService } from '@waha/modules/rmutex/rmutex.service';
|
||||
import { WAHAEvents } from '@waha/structures/enums.dto';
|
||||
import { WAHAWebhookMessageAck } from '@waha/structures/webhooks.dto';
|
||||
import { Job } from 'bullmq';
|
||||
import { PinoLogger } from 'nestjs-pino';
|
||||
import { ShouldMarkAsReadInChatWoot } from '@waha/apps/chatwoot/consumers/waha/message.ack.utils';
|
||||
|
||||
@Processor(QueueName.WAHA_MESSAGE_ACK, { concurrency: JOB_CONCURRENCY })
|
||||
export class WAHAMessageAckConsumer extends ChatWootWAHABaseConsumer {
|
||||
constructor(
|
||||
protected readonly manager: SessionManager,
|
||||
log: PinoLogger,
|
||||
rmutex: RMutexService,
|
||||
) {
|
||||
super(manager, log, rmutex, 'WAHAMessageAckConsumer');
|
||||
}
|
||||
|
||||
ShouldProcess(event: any): boolean {
|
||||
return ShouldMarkAsReadInChatWoot(event);
|
||||
}
|
||||
|
||||
GetChatId(event: WAHAWebhookMessageAck): string {
|
||||
return event.payload.from;
|
||||
}
|
||||
|
||||
async Process(
|
||||
job: Job<EventData, any, WAHAEvents>,
|
||||
info: IMessageInfo,
|
||||
): Promise<void> {
|
||||
const container = await this.DIContainer(job, job.data.app);
|
||||
const event = job.data.event as WAHAWebhookMessageAck;
|
||||
const session = new WAHASessionAPI(event.session, container.WAHASelf());
|
||||
const handler = new MessageAckHandler(
|
||||
container.ContactConversationService(),
|
||||
container.Logger(),
|
||||
info,
|
||||
session,
|
||||
container.Locale(),
|
||||
);
|
||||
try {
|
||||
await handler.handle(event);
|
||||
} catch (e) {
|
||||
// TODO: Investigate errors
|
||||
// https://github.com/devlikeapro/waha/issues/1492
|
||||
this.logger.error(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class MessageAckHandler {
|
||||
constructor(
|
||||
private readonly contactConversationService: ContactConversationService,
|
||||
private readonly logger: ILogger,
|
||||
private readonly info: IMessageInfo,
|
||||
private readonly session: WAHASessionAPI,
|
||||
private readonly locale: Locale,
|
||||
) {}
|
||||
|
||||
async handle(event: WAHAWebhookMessageAck): Promise<void> {
|
||||
const payload = event.payload;
|
||||
const contactInfo = WhatsAppContactInfo(
|
||||
this.session,
|
||||
payload.from,
|
||||
this.locale,
|
||||
);
|
||||
const conversation =
|
||||
await this.contactConversationService.ConversationByContact(contactInfo);
|
||||
this.info.onConversationId(conversation.conversationId);
|
||||
|
||||
const sourceId = conversation.sourceId;
|
||||
if (!sourceId) {
|
||||
this.logger.warn(
|
||||
`Contact not found for chat.id: ${payload.from}. Skipping read update for message ${payload.id}`,
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
await this.contactConversationService.markConversationAsRead(
|
||||
conversation.conversationId,
|
||||
sourceId,
|
||||
);
|
||||
this.logger.info(
|
||||
`Marked conversation ${conversation.conversationId} as read for chat.id: ${payload.from} (message: ${payload.id}, sourceId: ${sourceId})`,
|
||||
);
|
||||
} catch (error) {
|
||||
const reason = error instanceof Error ? error.message : String(error);
|
||||
this.logger.error(
|
||||
`Error marking conversation ${conversation.conversationId} as read for chat.id: ${payload.from}. Reason: ${reason}`,
|
||||
);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,466 @@
|
||||
import type { WAHAEngine, WAHAEvents } from '@waha/structures/enums.dto';
|
||||
import { ShouldMarkAsReadInChatWoot } from '@waha/apps/chatwoot/consumers/waha/message.ack.utils';
|
||||
|
||||
interface TestParam {
|
||||
name: string;
|
||||
expected: boolean;
|
||||
GOWS: any;
|
||||
NOWEB: any;
|
||||
WEBJS: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* Me - 444444444444 (lid - 144444444444444)
|
||||
* Participant - 11111111111 (lid - 011111111111111)
|
||||
* Group - 222222222222222222
|
||||
*/
|
||||
const ShouldMarkAsReadCases: TestParam[] = [
|
||||
{
|
||||
name: 'Participant read My message (READ ack)',
|
||||
expected: true,
|
||||
GOWS: {
|
||||
id: 'evt_00000000000000000000000000',
|
||||
session: 'default',
|
||||
event: 'message.ack' as WAHAEvents,
|
||||
payload: {
|
||||
id: 'true_11111111111@c.us_3333333333333333333333',
|
||||
from: '11111111111@c.us',
|
||||
to: null,
|
||||
participant: null,
|
||||
fromMe: true,
|
||||
ack: 3,
|
||||
ackName: 'READ',
|
||||
_data: {
|
||||
Chat: '11111111111@s.whatsapp.net',
|
||||
Sender: '11111111111@s.whatsapp.net',
|
||||
IsFromMe: false,
|
||||
IsGroup: false,
|
||||
AddressingMode: '',
|
||||
SenderAlt: '',
|
||||
RecipientAlt: '',
|
||||
BroadcastListOwner: '',
|
||||
BroadcastRecipients: null,
|
||||
MessageIDs: ['3333333333333333333333'],
|
||||
Type: 'read',
|
||||
MessageSender: '',
|
||||
},
|
||||
},
|
||||
metadata: {},
|
||||
me: {
|
||||
id: '444444444444@c.us',
|
||||
lid: '144444444444444@lid',
|
||||
jid: '444444444444:42@s.whatsapp.net',
|
||||
pushName: '',
|
||||
},
|
||||
environment: {
|
||||
version: '2025.10.4',
|
||||
engine: 'GOWS',
|
||||
tier: 'PLUS',
|
||||
browser: null,
|
||||
},
|
||||
engine: 'GOWS' as WAHAEngine,
|
||||
},
|
||||
NOWEB: {
|
||||
id: 'evt_00000000000000000000000000',
|
||||
session: 'default',
|
||||
event: 'message.ack',
|
||||
payload: {
|
||||
id: 'true_11111111111@c.us_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
|
||||
from: '11111111111@c.us',
|
||||
fromMe: true,
|
||||
ack: 3,
|
||||
ackName: 'READ',
|
||||
},
|
||||
metadata: {},
|
||||
me: {
|
||||
id: '444444444444@c.us',
|
||||
pushName: '',
|
||||
lid: '144444444444444@lid',
|
||||
},
|
||||
engine: 'NOWEB',
|
||||
environment: {
|
||||
version: '2025.10.4',
|
||||
engine: 'NOWEB',
|
||||
tier: 'PLUS',
|
||||
browser: null,
|
||||
},
|
||||
},
|
||||
WEBJS: {
|
||||
id: 'evt_00000000000000000000000000',
|
||||
session: 'default',
|
||||
event: 'message.ack',
|
||||
payload: {
|
||||
id: 'true_11111111111@c.us_AAA',
|
||||
from: '444444444444@c.us',
|
||||
fromMe: true,
|
||||
source: 'app',
|
||||
to: '11111111111@c.us',
|
||||
body: 'Nn',
|
||||
hasMedia: false,
|
||||
media: null,
|
||||
ack: 3,
|
||||
ackName: 'READ',
|
||||
vCards: [],
|
||||
_data: {
|
||||
id: {
|
||||
fromMe: true,
|
||||
remote: '11111111111@c.us',
|
||||
id: 'AAA',
|
||||
_serialized: 'true_11111111111@c.us_AAA',
|
||||
},
|
||||
viewed: false,
|
||||
from: '444444444444@c.us',
|
||||
to: '11111111111@c.us',
|
||||
author: '444444444444@c.us',
|
||||
ack: 3,
|
||||
},
|
||||
},
|
||||
metadata: {},
|
||||
me: {
|
||||
id: '444444444444@c.us',
|
||||
pushName: '',
|
||||
},
|
||||
engine: 'WEBJS',
|
||||
environment: {
|
||||
version: '2025.10.4',
|
||||
engine: 'WEBJS',
|
||||
tier: 'PLUS',
|
||||
browser: '/usr/bin/google-chrome-stable',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'Participant received My message (DEVICE ack)',
|
||||
expected: false,
|
||||
GOWS: {
|
||||
id: 'evt_00000000000000000000000000',
|
||||
session: 'default',
|
||||
event: 'message.ack' as WAHAEvents,
|
||||
payload: {
|
||||
id: 'true_11111111111@c.us_3333333333333333333333',
|
||||
from: '11111111111@c.us',
|
||||
to: null,
|
||||
participant: null,
|
||||
fromMe: true,
|
||||
ack: 2,
|
||||
ackName: 'DEVICE',
|
||||
_data: {
|
||||
Chat: '11111111111@s.whatsapp.net',
|
||||
Sender: '11111111111:3@s.whatsapp.net',
|
||||
IsFromMe: false,
|
||||
IsGroup: false,
|
||||
AddressingMode: '',
|
||||
SenderAlt: '',
|
||||
RecipientAlt: '',
|
||||
BroadcastListOwner: '',
|
||||
BroadcastRecipients: null,
|
||||
MessageIDs: ['3333333333333333333333'],
|
||||
Type: '',
|
||||
MessageSender: '',
|
||||
},
|
||||
},
|
||||
me: {
|
||||
id: '444444444444@c.us',
|
||||
lid: '144444444444444@lid',
|
||||
jid: '444444444444:42@s.whatsapp.net',
|
||||
pushName: '',
|
||||
},
|
||||
environment: {
|
||||
version: '2025.10.4',
|
||||
engine: 'GOWS',
|
||||
tier: 'PLUS',
|
||||
browser: null,
|
||||
},
|
||||
engine: 'GOWS' as WAHAEngine,
|
||||
},
|
||||
NOWEB: {
|
||||
id: 'evt_00000000000000000000000000',
|
||||
session: 'default',
|
||||
event: 'message.ack',
|
||||
payload: {
|
||||
id: 'true_11111111111@c.us_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
|
||||
from: '11111111111@c.us',
|
||||
fromMe: true,
|
||||
ack: 2,
|
||||
ackName: 'DEVICE',
|
||||
},
|
||||
metadata: {},
|
||||
me: {
|
||||
id: '444444444444@c.us',
|
||||
pushName: '',
|
||||
lid: '1144444444444444@lid',
|
||||
},
|
||||
engine: 'NOWEB',
|
||||
environment: {
|
||||
version: '2025.10.4',
|
||||
engine: 'NOWEB',
|
||||
tier: 'PLUS',
|
||||
browser: null,
|
||||
},
|
||||
},
|
||||
WEBJS: {
|
||||
id: 'evt_00000000000000000000000000',
|
||||
session: 'default',
|
||||
event: 'message.ack',
|
||||
payload: {
|
||||
id: 'true_11111111111@c.us_AAA',
|
||||
from: '444444444444@c.us',
|
||||
fromMe: true,
|
||||
source: 'app',
|
||||
to: '11111111111@c.us',
|
||||
body: 'Nn',
|
||||
hasMedia: false,
|
||||
media: null,
|
||||
ack: 2,
|
||||
ackName: 'DEVICE',
|
||||
vCards: [],
|
||||
_data: {
|
||||
id: {
|
||||
fromMe: true,
|
||||
remote: '11111111111@c.us',
|
||||
id: 'AAA',
|
||||
_serialized: 'true_11111111111@c.us_AAA',
|
||||
},
|
||||
from: '444444444444@c.us',
|
||||
to: '11111111111@c.us',
|
||||
author: '444444444444@c.us',
|
||||
ack: 2,
|
||||
},
|
||||
},
|
||||
metadata: {},
|
||||
me: {
|
||||
id: '444444444444@c.us',
|
||||
pushName: '',
|
||||
},
|
||||
engine: 'WEBJS',
|
||||
environment: {
|
||||
version: '2025.10.4',
|
||||
engine: 'WEBJS',
|
||||
tier: 'PLUS',
|
||||
browser: '/usr/bin/google-chrome-stable',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'Me read Participant message on another device (READ ack)',
|
||||
expected: false,
|
||||
GOWS: {
|
||||
id: 'evt_00000000000000000000000000',
|
||||
session: 'default',
|
||||
event: 'message.ack' as WAHAEvents,
|
||||
payload: {
|
||||
id: 'false_11111111111@c.us_3333333333333333333333',
|
||||
from: '11111111111@c.us',
|
||||
to: null,
|
||||
participant: null,
|
||||
fromMe: false,
|
||||
ack: 3,
|
||||
ackName: 'READ',
|
||||
_data: {
|
||||
Chat: '11111111111@s.whatsapp.net',
|
||||
Sender: '444444444444@s.whatsapp.net',
|
||||
IsFromMe: true,
|
||||
IsGroup: false,
|
||||
AddressingMode: '',
|
||||
SenderAlt: '',
|
||||
RecipientAlt: '',
|
||||
BroadcastListOwner: '',
|
||||
BroadcastRecipients: null,
|
||||
MessageIDs: ['3333333333333333333333'],
|
||||
Type: 'read',
|
||||
MessageSender: '11111111111@s.whatsapp.net',
|
||||
},
|
||||
},
|
||||
metadata: {},
|
||||
me: {
|
||||
id: '444444444444@c.us',
|
||||
lid: '144444444444444@lid',
|
||||
jid: '444444444444:42@s.whatsapp.net',
|
||||
pushName: '',
|
||||
},
|
||||
environment: {
|
||||
version: '2025.10.4',
|
||||
engine: 'GOWS',
|
||||
tier: 'PLUS',
|
||||
browser: null,
|
||||
},
|
||||
engine: 'GOWS' as WAHAEngine,
|
||||
},
|
||||
NOWEB: {
|
||||
id: 'evt_00000000000000000000000000',
|
||||
session: 'default',
|
||||
event: 'message.ack',
|
||||
payload: {
|
||||
id: '11111111111@c.us_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
|
||||
from: '11111111111@c.us',
|
||||
fromMe: false,
|
||||
ack: 3,
|
||||
ackName: 'READ',
|
||||
},
|
||||
metadata: {},
|
||||
me: {
|
||||
id: '444444444444@c.us',
|
||||
pushName: '',
|
||||
lid: '1144444444444444@lid',
|
||||
},
|
||||
engine: 'NOWEB',
|
||||
environment: {
|
||||
version: '2025.10.4',
|
||||
engine: 'NOWEB',
|
||||
tier: 'PLUS',
|
||||
browser: null,
|
||||
},
|
||||
},
|
||||
WEBJS: null,
|
||||
},
|
||||
{
|
||||
name: 'Participant read My Group Message (READ ack)',
|
||||
expected: false,
|
||||
GOWS: {
|
||||
id: 'evt_00000000000000000000000000',
|
||||
session: 'default',
|
||||
payload: {
|
||||
id: 'true_222222222222222222@g.us_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_444444444444@c.us',
|
||||
from: '222222222222222222@g.us',
|
||||
to: '011111111111111@lid',
|
||||
participant: '011111111111111@lid',
|
||||
fromMe: true,
|
||||
ack: 3,
|
||||
ackName: 'READ',
|
||||
_data: {
|
||||
Chat: '222222222222222222@g.us',
|
||||
Sender: '011111111111111@lid',
|
||||
IsFromMe: false,
|
||||
IsGroup: true,
|
||||
AddressingMode: '',
|
||||
SenderAlt: '',
|
||||
RecipientAlt: '',
|
||||
BroadcastListOwner: '',
|
||||
BroadcastRecipients: null,
|
||||
MessageIDs: ['AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'],
|
||||
Type: 'read',
|
||||
MessageSender: '',
|
||||
},
|
||||
},
|
||||
metadata: {},
|
||||
me: {
|
||||
id: '444444444444@c.us',
|
||||
lid: '144444444444444@lid',
|
||||
jid: '444444444444:42@s.whatsapp.net',
|
||||
pushName: '',
|
||||
},
|
||||
environment: {
|
||||
version: '2025.10.4',
|
||||
engine: 'GOWS',
|
||||
tier: 'PLUS',
|
||||
browser: null,
|
||||
},
|
||||
},
|
||||
NOWEB: {
|
||||
id: 'evt_00000000000000000000000000',
|
||||
session: 'default',
|
||||
event: 'message.ack',
|
||||
payload: {
|
||||
id: 'true_222222222222222222@g.us_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_444444444444@c.us',
|
||||
from: '222222222222222222@g.us',
|
||||
to: '222222222222222222@g.us',
|
||||
participant: '011111111111111@lid',
|
||||
fromMe: true,
|
||||
ack: 3,
|
||||
ackName: 'READ',
|
||||
_data: {
|
||||
key: {
|
||||
remoteJid: '222222222222222222@g.us',
|
||||
id: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
|
||||
fromMe: true,
|
||||
participant: '011111111111111@lid',
|
||||
},
|
||||
receipt: {
|
||||
userJid: '011111111111111@lid',
|
||||
},
|
||||
},
|
||||
},
|
||||
metadata: {},
|
||||
me: {
|
||||
id: '444444444444@c.us',
|
||||
pushName: '',
|
||||
lid: '1144444444444444@lid',
|
||||
},
|
||||
engine: 'NOWEB',
|
||||
environment: {
|
||||
version: '2025.10.4',
|
||||
engine: 'NOWEB',
|
||||
tier: 'PLUS',
|
||||
browser: null,
|
||||
},
|
||||
},
|
||||
WEBJS: {
|
||||
id: 'evt_00000000000000000000000000',
|
||||
session: 'default',
|
||||
event: 'message.ack',
|
||||
payload: {
|
||||
id: 'true_222222222222222222@g.us_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_444444444444@c.us',
|
||||
from: '222222222222222222@g.us',
|
||||
to: '222222222222222222@g.us',
|
||||
participant: '011111111111111@lid',
|
||||
fromMe: false,
|
||||
ack: 3,
|
||||
ackName: 'READ',
|
||||
_data: {
|
||||
tag: 'receipt',
|
||||
attrs: {
|
||||
from: {
|
||||
$1: {
|
||||
type: 0,
|
||||
user: '222222222222222222',
|
||||
server: 'g.us',
|
||||
},
|
||||
},
|
||||
type: 'read',
|
||||
id: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
|
||||
participant: {
|
||||
$1: {
|
||||
type: 1,
|
||||
user: '011111111111111',
|
||||
device: 0,
|
||||
domainType: 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
content: null,
|
||||
},
|
||||
},
|
||||
metadata: {},
|
||||
me: {
|
||||
id: '444444444444@c.us',
|
||||
pushName: '',
|
||||
},
|
||||
engine: 'WEBJS',
|
||||
environment: {
|
||||
version: '2025.10.4',
|
||||
engine: 'WEBJS',
|
||||
tier: 'PLUS',
|
||||
browser: '/usr/bin/google-chrome-stable',
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
describe('ShouldMarkAsReadInChatWoot', () => {
|
||||
const engines = ['GOWS', 'NOWEB', 'WEBJS'];
|
||||
for (const engine of engines) {
|
||||
describe(engine, () => {
|
||||
for (const param of ShouldMarkAsReadCases) {
|
||||
const name = `[${param.expected}] ${param.name}`;
|
||||
const event = param[engine];
|
||||
const testfn = event ? test : test.skip;
|
||||
const expected = param.expected;
|
||||
testfn(name, () => {
|
||||
// Test
|
||||
const result = ShouldMarkAsReadInChatWoot(event);
|
||||
expect(result).toBe(expected);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,31 @@
|
||||
import type { WAHAWebhookMessageAck } from '@waha/structures/webhooks.dto';
|
||||
import { isJidCusFormat } from '@waha/utils/wa';
|
||||
import { WAMessageAck } from '@waha/structures/enums.dto';
|
||||
import { isLidUser, toCusFormat } from '@waha/core/utils/jids';
|
||||
|
||||
export function ShouldMarkAsReadInChatWoot(
|
||||
event: WAHAWebhookMessageAck,
|
||||
): boolean {
|
||||
// Mark as seen only if it's DM
|
||||
// Ignore groups and other multiple participants chats
|
||||
const chatId = event.payload.from;
|
||||
if (!isJidCusFormat(chatId) && !isLidUser(chatId)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const payload = event.payload;
|
||||
// Only READ and PLAYED
|
||||
const read = payload.ack === WAMessageAck.READ;
|
||||
const played = payload.ack == WAMessageAck.PLAYED;
|
||||
if (!read && !played) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Only process when OUR message (fromMe: true) was read by recipient
|
||||
if (!payload.fromMe) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Mark ChatWoot conversation as read when recipient reads our message
|
||||
return true;
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
import { Processor } from '@nestjs/bullmq';
|
||||
import { JOB_CONCURRENCY } from '@waha/apps/app_sdk/constants';
|
||||
import { SendAttachment } from '@waha/apps/chatwoot/client/types';
|
||||
import { QueueName } from '@waha/apps/chatwoot/consumers/QueueName';
|
||||
import { EventData } from '@waha/apps/chatwoot/consumers/types';
|
||||
import {
|
||||
@@ -10,7 +9,6 @@ import {
|
||||
MessageBaseHandler,
|
||||
} from '@waha/apps/chatwoot/consumers/waha/base';
|
||||
import { WAHASessionAPI } from '@waha/apps/chatwoot/session/WAHASelf';
|
||||
import { WhatsappToMarkdown } from '@waha/apps/chatwoot/text';
|
||||
import { SessionManager } from '@waha/core/abc/manager.abc';
|
||||
import { parseMessageIdSerialized } from '@waha/core/utils/ids';
|
||||
import { RMutexService } from '@waha/modules/rmutex/rmutex.service';
|
||||
@@ -19,14 +17,19 @@ import { WAMessage } from '@waha/structures/responses.dto';
|
||||
import { WAHAWebhookMessageAny } from '@waha/structures/webhooks.dto';
|
||||
import { Job } from 'bullmq';
|
||||
import { PinoLogger } from 'nestjs-pino';
|
||||
import { TKey } from '@waha/apps/chatwoot/i18n/templates';
|
||||
import { JobLink } from '@waha/apps/app_sdk/JobUtils';
|
||||
import { proto } from '@adiwajshing/baileys';
|
||||
import * as lodash from 'lodash';
|
||||
import { parseVCardV3, SimpleVCardInfo } from '@waha/core/vcard';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const mime = require('mime-types');
|
||||
import {
|
||||
FacebookAdMessage,
|
||||
EventMessage,
|
||||
PixMessage,
|
||||
LocationMessage,
|
||||
MessageToChatWootConverter,
|
||||
PollMessage,
|
||||
ListMessage,
|
||||
ShareContactMessage,
|
||||
TextMessage,
|
||||
UnsupportedMessage,
|
||||
resolveProtoMessage,
|
||||
} from '@waha/apps/chatwoot/messages/to/chatwoot';
|
||||
|
||||
@Processor(QueueName.WAHA_MESSAGE_ANY, { concurrency: JOB_CONCURRENCY })
|
||||
export class WAHAMessageAnyConsumer extends ChatWootWAHABaseConsumer {
|
||||
@@ -63,135 +66,66 @@ export class WAHAMessageAnyConsumer extends ChatWootWAHABaseConsumer {
|
||||
}
|
||||
}
|
||||
|
||||
function isEmptyString(content: string) {
|
||||
if (!content) {
|
||||
return true;
|
||||
}
|
||||
return content == '' || content == '\n';
|
||||
}
|
||||
|
||||
class MessageAnyHandler extends MessageBaseHandler<WAMessage> {
|
||||
protected async getMessage(
|
||||
payload: WAMessage,
|
||||
): Promise<ChatWootMessagePartial> {
|
||||
const protoMessage = this.getProtoMessage(payload);
|
||||
let msg = await this.getTextMessage(payload, protoMessage);
|
||||
let converter: MessageToChatWootConverter;
|
||||
let msg: ChatWootMessagePartial;
|
||||
const protoMessage = resolveProtoMessage(payload);
|
||||
|
||||
// Check for Facebook Ad first - but let it use the normal flow later
|
||||
converter = new FacebookAdMessage(this.l, this.logger);
|
||||
msg = await converter.convert(payload, protoMessage);
|
||||
if (msg) {
|
||||
return msg;
|
||||
}
|
||||
msg = this.getLocationMessage(payload, protoMessage);
|
||||
|
||||
converter = new TextMessage(this.l, this.logger, this.waha);
|
||||
msg = await converter.convert(payload, null);
|
||||
if (msg) {
|
||||
return msg;
|
||||
}
|
||||
msg = this.getShareContactMessage(payload, protoMessage);
|
||||
|
||||
converter = new LocationMessage(this.l);
|
||||
msg = await converter.convert(payload, protoMessage);
|
||||
if (msg) {
|
||||
return msg;
|
||||
}
|
||||
return this.getUnsupportedMessage();
|
||||
}
|
||||
|
||||
protected async getTextMessage(
|
||||
payload: WAMessage,
|
||||
_: proto.Message | null,
|
||||
): Promise<ChatWootMessagePartial | null> {
|
||||
const attachments = await this.getAttachments(payload);
|
||||
const content = this.l
|
||||
.key(TKey.WA_TO_CW_MESSAGE)
|
||||
.render({ payload: payload });
|
||||
if (isEmptyString(content) && attachments.length == 0) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
content: WhatsappToMarkdown(content),
|
||||
attachments: attachments,
|
||||
private: undefined,
|
||||
};
|
||||
}
|
||||
|
||||
private getLocationMessage(
|
||||
payload: WAMessage,
|
||||
message: proto.Message | null,
|
||||
): ChatWootMessagePartial | null {
|
||||
const hasLocation = !lodash.isEmpty(message?.locationMessage);
|
||||
const hasLiveLocation = !lodash.isEmpty(message?.liveLocationMessage);
|
||||
if (!hasLocation && !hasLiveLocation) {
|
||||
return null;
|
||||
}
|
||||
const location = this.l.key(TKey.WA_TO_CW_MESSAGE_LOCATION).r({
|
||||
payload,
|
||||
message,
|
||||
});
|
||||
if (isEmptyString(location)) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
content: location,
|
||||
attachments: [],
|
||||
private: undefined,
|
||||
};
|
||||
}
|
||||
|
||||
private getShareContactMessage(
|
||||
_payload: WAMessage,
|
||||
message: proto.Message | null,
|
||||
): ChatWootMessagePartial | null {
|
||||
let vcards: string[] = [];
|
||||
|
||||
if (!lodash.isEmpty(message?.contactsArrayMessage?.contacts)) {
|
||||
vcards = message!.contactsArrayMessage!.contacts.map((c) => c.vcard);
|
||||
} else if (!lodash.isEmpty(message?.contactMessage?.vcard)) {
|
||||
vcards = [message!.contactMessage!.vcard];
|
||||
}
|
||||
if (vcards.length === 0) {
|
||||
return null;
|
||||
}
|
||||
const attachments: SendAttachment[] = vcards.map((v, i) => ({
|
||||
content: Buffer.from(v, 'utf8').toString('base64'),
|
||||
encoding: 'base64',
|
||||
filename: `vcard-${i + 1}.vcf`,
|
||||
}));
|
||||
let contacts: SimpleVCardInfo[] = [];
|
||||
try {
|
||||
contacts = vcards.map(parseVCardV3);
|
||||
} catch (err) {
|
||||
this.logger.error(
|
||||
`Error parsing some vcards: vcards=${vcards}, err=${err}`,
|
||||
);
|
||||
}
|
||||
const msg = this.l.key(TKey.WA_TO_CW_MESSAGE_CONTACTS).r({ contacts });
|
||||
if (contacts.length === 0 && attachments.length === 0) {
|
||||
return null;
|
||||
converter = new ShareContactMessage(this.l, this.logger);
|
||||
msg = await converter.convert(payload, protoMessage);
|
||||
if (msg) {
|
||||
return msg;
|
||||
}
|
||||
|
||||
return {
|
||||
content: msg,
|
||||
attachments: attachments,
|
||||
private: undefined,
|
||||
};
|
||||
}
|
||||
|
||||
private getUnsupportedMessage(): ChatWootMessagePartial {
|
||||
const unsupported = this.l
|
||||
.key(TKey.WA_TO_CW_MESSAGE_UNSUPPORTED)
|
||||
.render({ details: JobLink(this.job) });
|
||||
return {
|
||||
content: unsupported,
|
||||
attachments: [],
|
||||
private: true,
|
||||
};
|
||||
}
|
||||
|
||||
private getProtoMessage(payload: WAMessage): proto.Message | null {
|
||||
// GOWS
|
||||
if (payload._data.Message) {
|
||||
return payload._data.Message;
|
||||
converter = new PollMessage(this.l);
|
||||
msg = await converter.convert(payload, protoMessage);
|
||||
if (msg) {
|
||||
return msg;
|
||||
}
|
||||
// NOWEB
|
||||
if (payload._data.message) {
|
||||
return payload._data.message;
|
||||
|
||||
converter = new ListMessage(this.l);
|
||||
msg = await converter.convert(payload, protoMessage);
|
||||
if (msg) {
|
||||
return msg;
|
||||
}
|
||||
// WEBJS - not available
|
||||
return null;
|
||||
|
||||
converter = new EventMessage(this.l);
|
||||
msg = await converter.convert(payload, protoMessage);
|
||||
if (msg) {
|
||||
return msg;
|
||||
}
|
||||
|
||||
converter = new PixMessage(this.l, this.logger);
|
||||
msg = await converter.convert(payload, protoMessage);
|
||||
if (msg) {
|
||||
return msg;
|
||||
}
|
||||
|
||||
converter = new UnsupportedMessage(this.l, this.job);
|
||||
msg = await converter.convert(payload, protoMessage);
|
||||
return msg;
|
||||
}
|
||||
|
||||
getReplyToWhatsAppID(payload: WAMessage): string {
|
||||
@@ -202,34 +136,4 @@ class MessageAnyHandler extends MessageBaseHandler<WAMessage> {
|
||||
const key = parseMessageIdSerialized(replyTo.id, true);
|
||||
return key.id;
|
||||
}
|
||||
|
||||
async getAttachments(payload: WAMessage): Promise<SendAttachment[]> {
|
||||
//
|
||||
// WAHA
|
||||
//
|
||||
const hasMedia = payload.media?.url;
|
||||
if (!hasMedia) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const attachments: SendAttachment[] = [];
|
||||
const media = payload.media;
|
||||
this.logger.info(`Downloading media from '${media.url}'...`);
|
||||
const buffer = await this.waha.fetch(media.url);
|
||||
const fileContent = buffer.toString('base64');
|
||||
let filename = media.filename;
|
||||
if (!filename) {
|
||||
const extension = mime.extension(media.mimetype);
|
||||
filename = `no-filename.${extension}`;
|
||||
}
|
||||
|
||||
const attachment: SendAttachment = {
|
||||
content: fileContent,
|
||||
filename: filename,
|
||||
encoding: 'base64',
|
||||
};
|
||||
attachments.push(attachment);
|
||||
this.logger.info(`Downloaded media from '${media.url}' as '${filename}'`);
|
||||
return attachments;
|
||||
}
|
||||
}
|
||||
@@ -6,9 +6,8 @@ import {
|
||||
ChatWootMessagePartial,
|
||||
ChatWootWAHABaseConsumer,
|
||||
IMessageInfo,
|
||||
MessageBaseHandler,
|
||||
} from '@waha/apps/chatwoot/consumers/waha/base';
|
||||
import { MessageBaseHandler } from '@waha/apps/chatwoot/consumers/waha/base';
|
||||
import { WhatsappToMarkdown } from '@waha/apps/chatwoot/text';
|
||||
import { SessionManager } from '@waha/core/abc/manager.abc';
|
||||
import { RMutexService } from '@waha/modules/rmutex/rmutex.service';
|
||||
import { WAHAEvents } from '@waha/structures/enums.dto';
|
||||
@@ -19,10 +18,12 @@ import {
|
||||
import { Job } from 'bullmq';
|
||||
import { PinoLogger } from 'nestjs-pino';
|
||||
|
||||
import { SendAttachment } from '../../client/types';
|
||||
import { WAHASessionAPI } from '../../session/WAHASelf';
|
||||
import { TKey } from '@waha/apps/chatwoot/i18n/templates';
|
||||
import { WAMessage } from '@waha/structures/responses.dto';
|
||||
import {
|
||||
MessageEdited,
|
||||
MessageToChatWootConverter,
|
||||
resolveProtoMessage,
|
||||
} from '@waha/apps/chatwoot/messages/to/chatwoot';
|
||||
|
||||
@Processor(QueueName.WAHA_MESSAGE_EDITED, { concurrency: JOB_CONCURRENCY })
|
||||
export class WAHAMessageEditedConsumer extends ChatWootWAHABaseConsumer {
|
||||
@@ -63,25 +64,12 @@ class MessageEditedHandler extends MessageBaseHandler<WAMessageEditedBody> {
|
||||
protected async getMessage(
|
||||
payload: WAMessageEditedBody,
|
||||
): Promise<ChatWootMessagePartial> {
|
||||
const body = payload.body;
|
||||
const formatted = WhatsappToMarkdown(body);
|
||||
const content = this.l
|
||||
.key(TKey.MESSAGE_EDITED_IN_WHATSAPP)
|
||||
.render({ text: formatted });
|
||||
return {
|
||||
content: content,
|
||||
attachments: [],
|
||||
private: undefined,
|
||||
};
|
||||
const protoMessage = resolveProtoMessage(payload);
|
||||
const converter: MessageToChatWootConverter = new MessageEdited(this.l);
|
||||
return converter.convert(payload, protoMessage);
|
||||
}
|
||||
|
||||
getReplyToWhatsAppID(payload: WAMessageEditedBody): string {
|
||||
return payload.editedMessageId;
|
||||
}
|
||||
|
||||
async getAttachments(
|
||||
payload: WAMessageEditedBody,
|
||||
): Promise<SendAttachment[]> {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@@ -82,8 +82,4 @@ export class MessageReactionHandler extends MessageBaseHandler<WAMessageReaction
|
||||
const key = parseMessageIdSerialized(messageId, false);
|
||||
return key.id;
|
||||
}
|
||||
|
||||
async getAttachments(payload: WAMessageReaction): Promise<SendAttachment[]> {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@@ -16,13 +16,13 @@ import {
|
||||
MessageMappingService,
|
||||
} from '@waha/apps/chatwoot/storage';
|
||||
import { SessionManager } from '@waha/core/abc/manager.abc';
|
||||
import { toCusFormat } from '@waha/core/engines/noweb/session.noweb.core';
|
||||
import { RMutexService } from '@waha/modules/rmutex/rmutex.service';
|
||||
import { WAHAEvents } from '@waha/structures/enums.dto';
|
||||
import { WAHAWebhookMessageRevoked } from '@waha/structures/webhooks.dto';
|
||||
import { Job } from 'bullmq';
|
||||
import { PinoLogger } from 'nestjs-pino';
|
||||
import { TKey } from '@waha/apps/chatwoot/i18n/templates';
|
||||
import { toCusFormat } from '@waha/core/utils/jids';
|
||||
|
||||
@Processor(QueueName.WAHA_MESSAGE_REVOKED, { concurrency: JOB_CONCURRENCY })
|
||||
export class WAHAMessageRevokedConsumer extends ChatWootWAHABaseConsumer {
|
||||
|
||||
@@ -20,6 +20,7 @@ import { WAHAWebhookSessionStatus } from '@waha/structures/webhooks.dto';
|
||||
import { Job } from 'bullmq';
|
||||
import { PinoLogger } from 'nestjs-pino';
|
||||
import { TKey } from '@waha/apps/chatwoot/i18n/templates';
|
||||
import { waitUntil } from '@waha/utils/promiseTimeout';
|
||||
|
||||
@Processor(QueueName.WAHA_SESSION_STATUS, { concurrency: JOB_CONCURRENCY })
|
||||
export class WAHASessionStatusConsumer extends ChatWootWAHABaseConsumer {
|
||||
@@ -49,6 +50,9 @@ export class WAHASessionStatusConsumer extends ChatWootWAHABaseConsumer {
|
||||
}
|
||||
}
|
||||
|
||||
const RECOVER_TIME_MS = 10_000;
|
||||
const CHECK_STATUS_INTERVAL_MS = 2_000;
|
||||
|
||||
export class SessionStatusHandler {
|
||||
constructor(
|
||||
private repo: ContactConversationService,
|
||||
@@ -57,28 +61,61 @@ export class SessionStatusHandler {
|
||||
) {}
|
||||
|
||||
async handle(data: WAHAWebhookSessionStatus) {
|
||||
const conversation = await this.repo.InboxNotifications();
|
||||
// Report session status
|
||||
const emoji = SessionStatusEmoji(data.payload.status);
|
||||
const activity = this.l.key(TKey.APP_SESSION_STATUS_CHANGE).r({
|
||||
emoji: emoji,
|
||||
session: data.session,
|
||||
status: data.payload.status,
|
||||
});
|
||||
await conversation.activity(activity);
|
||||
|
||||
const payload = data.payload;
|
||||
let text = '';
|
||||
const current = payload.statuses?.at(-1);
|
||||
const previous = payload.statuses?.at(-2);
|
||||
const older = payload.statuses?.at(-3);
|
||||
switch (payload.status) {
|
||||
case WAHASessionStatus.STARTING:
|
||||
// WORKING => STARTING [=> WORKING]
|
||||
if (previous?.status == WAHASessionStatus.WORKING) {
|
||||
// if previous is WORKING - wait, give time to recover
|
||||
const recovered = await waitUntil(
|
||||
async () => {
|
||||
const response = await this.waha.get(data.session);
|
||||
return response.status == WAHASessionStatus.WORKING;
|
||||
},
|
||||
CHECK_STATUS_INTERVAL_MS,
|
||||
RECOVER_TIME_MS,
|
||||
);
|
||||
if (recovered) {
|
||||
// Current status is WORKING, no needs for an alert
|
||||
return;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case WAHASessionStatus.WORKING:
|
||||
// WORKING => STARTING => WORKING
|
||||
if (
|
||||
previous?.status == WAHASessionStatus.STARTING &&
|
||||
older?.status == WAHASessionStatus.WORKING
|
||||
) {
|
||||
if (current?.timestamp - previous?.timestamp < RECOVER_TIME_MS) {
|
||||
// Session got recovered fast, no needs to notify about that
|
||||
return;
|
||||
}
|
||||
}
|
||||
text = this.l.key(TKey.APP_SESSION_STATUS_WORKING).r({
|
||||
name: data.me?.pushName || 'Unknown',
|
||||
id: data.me?.id || 'No phone number',
|
||||
});
|
||||
break;
|
||||
case WAHASessionStatus.STOPPED:
|
||||
try {
|
||||
// Check the session is yet in STOPPED status.
|
||||
// In case of server restarts,
|
||||
// the consumer can process STOPPED after STARTING/WORKING
|
||||
const response = await this.waha.get(data.session);
|
||||
if (response.status != WAHASessionStatus.STOPPED) {
|
||||
return;
|
||||
}
|
||||
} catch (_) {}
|
||||
text = this.l.key(TKey.APP_SESSION_STATUS_ERROR).r();
|
||||
text += '\n\n';
|
||||
text += this.l.key(TKey.APP_HELP_REMINDER).r();
|
||||
text += '\n\n';
|
||||
break;
|
||||
case WAHASessionStatus.FAILED:
|
||||
text = this.l.key(TKey.APP_SESSION_STATUS_ERROR).r();
|
||||
text += '\n\n';
|
||||
@@ -88,6 +125,18 @@ export class SessionStatusHandler {
|
||||
case WAHASessionStatus.SCAN_QR_CODE:
|
||||
text = this.l.key(TKey.APP_SESSION_SCAN_QR_CODE).r();
|
||||
}
|
||||
//
|
||||
// Report Status Change if required
|
||||
//
|
||||
const conversation = await this.repo.InboxNotifications();
|
||||
const emoji = SessionStatusEmoji(data.payload.status);
|
||||
const activity = this.l.key(TKey.APP_SESSION_STATUS_CHANGE).r({
|
||||
emoji: emoji,
|
||||
session: data.session,
|
||||
status: data.payload.status,
|
||||
});
|
||||
await conversation.activity(activity);
|
||||
|
||||
if (text) {
|
||||
const message: conversation_message_create = {
|
||||
content: text,
|
||||
|
||||
@@ -1,16 +1,4 @@
|
||||
import {
|
||||
isJidGroup,
|
||||
isJidNewsletter,
|
||||
isJidStatusBroadcast,
|
||||
} from '@adiwajshing/baileys';
|
||||
import {
|
||||
isJidBroadcast,
|
||||
isLidUser,
|
||||
} from '@adiwajshing/baileys/lib/WABinary/jid-utils';
|
||||
import {
|
||||
public_contact_create_update_payload,
|
||||
public_contact_create_update_payload as Contact,
|
||||
} from '@figuro/chatwoot-sdk';
|
||||
import { public_contact_create_update_payload as Contact } from '@figuro/chatwoot-sdk';
|
||||
import { ContactInfo } from '@waha/apps/chatwoot/client/ContactConversationService';
|
||||
import { AttributeKey } from '@waha/apps/chatwoot/const';
|
||||
import { Locale } from '@waha/apps/chatwoot/i18n/locale';
|
||||
@@ -18,6 +6,16 @@ import { WAHASessionAPI } from '@waha/apps/chatwoot/session/WAHASelf';
|
||||
import { Channel } from '@waha/structures/channels.dto';
|
||||
import { CacheAsync } from '@waha/utils/Cache';
|
||||
import { TKey } from '@waha/apps/chatwoot/i18n/templates';
|
||||
import {
|
||||
isJidBroadcast,
|
||||
isJidGroup,
|
||||
isJidNewsletter,
|
||||
isJidStatusBroadcast,
|
||||
isLidUser,
|
||||
isPnUser,
|
||||
} from '@waha/core/utils/jids';
|
||||
import { UnknownJIDFormat } from '@waha/apps/chatwoot/errors';
|
||||
import { E164Parser } from '@waha/core/utils/PhoneJidNormalizer';
|
||||
|
||||
/**
|
||||
* Base WhatsApp contact info class
|
||||
@@ -71,8 +69,7 @@ class JidContactInfo extends ChatContactInfo {
|
||||
const contact: any = await this.session.getContact(this.chatId);
|
||||
const name =
|
||||
contact?.name || contact?.pushName || contact?.pushname || this.chatId;
|
||||
const phoneNumber = this.chatId.split('@')[0];
|
||||
const phoneNumberE164 = '+' + phoneNumber;
|
||||
const phoneNumberE164 = E164Parser.fromJid(this.chatId);
|
||||
|
||||
const result: Contact = {
|
||||
name: name,
|
||||
@@ -154,6 +151,7 @@ class GroupContactInfo extends ChatContactInfo {
|
||||
const group: any = await this.session?.getGroup(this.chatId);
|
||||
if (group) {
|
||||
name = group.subject || group.name || group.topic || name;
|
||||
name = group.Name || name;
|
||||
const suffix = this.locale
|
||||
.key(TKey.WHATSAPP_CONTACT_GROUP_SUFFIX)
|
||||
.render();
|
||||
@@ -271,6 +269,9 @@ export function WhatsAppContactInfo(
|
||||
return new BroadcastContactInfo(session, chatId, locale);
|
||||
} else if (isLidUser(chatId)) {
|
||||
return new LidContactInfo(session, chatId, locale);
|
||||
} else if (isPnUser(chatId)) {
|
||||
return new JidContactInfo(session, chatId, locale);
|
||||
} else {
|
||||
throw new UnknownJIDFormat(chatId);
|
||||
}
|
||||
return new JidContactInfo(session, chatId, locale);
|
||||
}
|
||||
@@ -2,10 +2,10 @@ import ChatwootClient from '@figuro/chatwoot-sdk';
|
||||
import * as lodash from 'lodash';
|
||||
import { AxiosLogging } from '@waha/apps/app_sdk/AxiosLogging';
|
||||
import { ILogger } from '@waha/apps/app_sdk/ILogger';
|
||||
import { ContactAPI } from '@waha/apps/chatwoot/client/ContactAPI';
|
||||
import { ContactService } from '@waha/apps/chatwoot/client/ContactService';
|
||||
import { ContactConversationService } from '@waha/apps/chatwoot/client/ContactConversationService';
|
||||
import { ConversationAPI } from '@waha/apps/chatwoot/client/ConversationAPI';
|
||||
import { CustomAttributesAPI } from '@waha/apps/chatwoot/client/CustomAttributesAPI';
|
||||
import { ConversationService } from '@waha/apps/chatwoot/client/ConversationService';
|
||||
import { CustomAttributesService } from '@waha/apps/chatwoot/client/CustomAttributesService';
|
||||
import { ChatWootInboxAPI } from '@waha/apps/chatwoot/client/interfaces';
|
||||
import {
|
||||
ChatWootAppConfig,
|
||||
@@ -25,21 +25,17 @@ import {
|
||||
import { Job } from 'bullmq';
|
||||
import { Knex } from 'knex';
|
||||
import { i18n } from '@waha/apps/chatwoot/i18n';
|
||||
import { CacheSync } from '@waha/utils/Cache';
|
||||
import {
|
||||
ConversationSelector,
|
||||
ConversationSort,
|
||||
} from '@waha/apps/chatwoot/services/ConversationSelector';
|
||||
|
||||
/**
|
||||
* Dependency Injection Container for ChatWoot
|
||||
* Manages the creation and caching of various clients and repositories
|
||||
*/
|
||||
export class DIContainer {
|
||||
private accountAPI: ChatwootClient;
|
||||
private inboxAPI: ChatWootInboxAPI;
|
||||
private contactAPI: ContactAPI;
|
||||
private conversationAPI: ConversationAPI;
|
||||
private contactConversationService: ContactConversationService;
|
||||
private locale: Locale;
|
||||
private messageMappingService: MessageMappingService;
|
||||
private wahaSelf: WAHASelf;
|
||||
|
||||
/**
|
||||
* Creates a new DIContainer with the given configuration
|
||||
*/
|
||||
@@ -68,122 +64,124 @@ export class DIContainer {
|
||||
return this.knex;
|
||||
}
|
||||
|
||||
@CacheSync()
|
||||
public Locale(): Locale {
|
||||
if (!this.locale) {
|
||||
this.locale = i18n.locale(this.config.locale || DEFAULT_LOCALE);
|
||||
this.locale = this.locale.override(this.ChatWootConfig().templates);
|
||||
}
|
||||
return this.locale;
|
||||
let locale = i18n.locale(this.config.locale || DEFAULT_LOCALE);
|
||||
locale = locale.override(this.ChatWootConfig().templates);
|
||||
return locale;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the AccountAPI client
|
||||
* @returns ChatwootClient instance
|
||||
*/
|
||||
@CacheSync()
|
||||
public AccountAPI(): ChatwootClient {
|
||||
if (!this.accountAPI) {
|
||||
this.accountAPI = new ChatwootClient({
|
||||
config: {
|
||||
basePath: this.config.url,
|
||||
with_credentials: true,
|
||||
credentials: 'include',
|
||||
token: this.config.accountToken,
|
||||
},
|
||||
});
|
||||
}
|
||||
return this.accountAPI;
|
||||
return new ChatwootClient({
|
||||
config: {
|
||||
basePath: this.config.url,
|
||||
with_credentials: true,
|
||||
credentials: 'include',
|
||||
token: this.config.accountToken,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the InboxAPI client
|
||||
* @returns ChatWootInboxAPI instance
|
||||
*/
|
||||
@CacheSync()
|
||||
public InboxAPI(): ChatWootInboxAPI {
|
||||
if (!this.inboxAPI) {
|
||||
const chatwootClientAPI = new ChatwootClient({
|
||||
config: {
|
||||
basePath: this.config.url,
|
||||
with_credentials: true,
|
||||
credentials: 'include',
|
||||
token: this.config.inboxIdentifier,
|
||||
},
|
||||
});
|
||||
this.inboxAPI = chatwootClientAPI.client as ChatWootInboxAPI;
|
||||
}
|
||||
return this.inboxAPI;
|
||||
const chatwootClientAPI = new ChatwootClient({
|
||||
config: {
|
||||
basePath: this.config.url,
|
||||
with_credentials: true,
|
||||
credentials: 'include',
|
||||
token: this.config.inboxIdentifier,
|
||||
},
|
||||
});
|
||||
return chatwootClientAPI.client as ChatWootInboxAPI;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the ContactAPI
|
||||
* @returns ContactAPI instance
|
||||
* Gets the ContactService
|
||||
* @returns ContactService instance
|
||||
*/
|
||||
private ContactAPI(): ContactAPI {
|
||||
if (!this.contactAPI) {
|
||||
this.contactAPI = new ContactAPI(
|
||||
this.config,
|
||||
this.AccountAPI(),
|
||||
this.InboxAPI(),
|
||||
this.logger,
|
||||
);
|
||||
}
|
||||
return this.contactAPI;
|
||||
@CacheSync()
|
||||
private ContactService(): ContactService {
|
||||
return new ContactService(
|
||||
this.config,
|
||||
this.AccountAPI(),
|
||||
this.InboxAPI(),
|
||||
this.logger,
|
||||
);
|
||||
}
|
||||
|
||||
@CacheSync()
|
||||
public ConversationSelector() {
|
||||
const config = this.ChatWootConfig();
|
||||
return new ConversationSelector({
|
||||
sort: config.conversations.sort,
|
||||
status: config.conversations.status,
|
||||
inboxId: this.config.inboxId,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the ConversationAPI
|
||||
* @returns ConversationAPI instance
|
||||
* Gets the ConversationService
|
||||
* @returns ConversationService instance
|
||||
*/
|
||||
private ConversationAPI(): ConversationAPI {
|
||||
if (!this.conversationAPI) {
|
||||
this.conversationAPI = new ConversationAPI(
|
||||
this.config,
|
||||
this.InboxAPI(),
|
||||
this.logger,
|
||||
);
|
||||
}
|
||||
return this.conversationAPI;
|
||||
@CacheSync()
|
||||
private ConversationService(): ConversationService {
|
||||
return new ConversationService(
|
||||
this.config,
|
||||
this.AccountAPI(),
|
||||
this.InboxAPI(),
|
||||
this.ConversationSelector(),
|
||||
this.logger,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the ContactConversationService
|
||||
* @returns ContactConversationService instance
|
||||
*/
|
||||
@CacheSync()
|
||||
public ContactConversationService(): ContactConversationService {
|
||||
if (!this.contactConversationService) {
|
||||
this.contactConversationService = new ContactConversationService(
|
||||
this.config,
|
||||
this.ContactAPI(),
|
||||
this.ConversationAPI(),
|
||||
this.AccountAPI(),
|
||||
this.logger,
|
||||
this.Locale(),
|
||||
);
|
||||
}
|
||||
return this.contactConversationService;
|
||||
return new ContactConversationService(
|
||||
this.config,
|
||||
this.ContactService(),
|
||||
this.ConversationService(),
|
||||
this.AccountAPI(),
|
||||
this.logger,
|
||||
this.Locale(),
|
||||
);
|
||||
}
|
||||
|
||||
@CacheSync()
|
||||
private ChatwootMessageRepository(): ChatwootMessageRepository {
|
||||
return new ChatwootMessageRepository(this.Knex(), this.AppPk());
|
||||
}
|
||||
|
||||
@CacheSync()
|
||||
private WhatsAppMessageRepository(): WhatsAppMessageRepository {
|
||||
return new WhatsAppMessageRepository(this.Knex(), this.AppPk());
|
||||
}
|
||||
|
||||
@CacheSync()
|
||||
private MessageMappingRepository(): MessageMappingRepository {
|
||||
return new MessageMappingRepository(this.Knex(), this.AppPk());
|
||||
}
|
||||
|
||||
@CacheSync()
|
||||
public MessageMappingService(): MessageMappingService {
|
||||
if (!this.messageMappingService) {
|
||||
this.messageMappingService = new MessageMappingService(
|
||||
this.Knex(),
|
||||
this.WhatsAppMessageRepository(),
|
||||
this.ChatwootMessageRepository(),
|
||||
this.MessageMappingRepository(),
|
||||
);
|
||||
}
|
||||
return this.messageMappingService;
|
||||
return new MessageMappingService(
|
||||
this.Knex(),
|
||||
this.WhatsAppMessageRepository(),
|
||||
this.ChatwootMessageRepository(),
|
||||
this.MessageMappingRepository(),
|
||||
);
|
||||
}
|
||||
|
||||
public ChatWootErrorReporter(job: Job): ChatWootErrorReporter {
|
||||
@@ -194,19 +192,20 @@ export class DIContainer {
|
||||
* Gets the WAHASelf instance
|
||||
* @returns WAHASelf instance
|
||||
*/
|
||||
@CacheSync()
|
||||
public WAHASelf(): WAHASelf {
|
||||
if (!this.wahaSelf) {
|
||||
this.wahaSelf = new WAHASelf();
|
||||
const logging = new AxiosLogging(this.Logger());
|
||||
logging.applyTo(this.wahaSelf.client);
|
||||
}
|
||||
return this.wahaSelf;
|
||||
const self = new WAHASelf();
|
||||
const logging = new AxiosLogging(this.Logger());
|
||||
logging.applyTo(self.client);
|
||||
return self;
|
||||
}
|
||||
|
||||
public CustomAttributesAPI() {
|
||||
return new CustomAttributesAPI(this.config, this.AccountAPI());
|
||||
@CacheSync()
|
||||
public CustomAttributesService() {
|
||||
return new CustomAttributesService(this.config, this.AccountAPI());
|
||||
}
|
||||
|
||||
@CacheSync()
|
||||
public ChatWootConfig(): ChatWootConfig {
|
||||
const defaults: ChatWootConfig = {
|
||||
templates: {},
|
||||
@@ -214,6 +213,10 @@ export class DIContainer {
|
||||
commands: {
|
||||
server: true,
|
||||
},
|
||||
conversations: {
|
||||
sort: ConversationSort.created_newest,
|
||||
status: null,
|
||||
},
|
||||
};
|
||||
return lodash.defaults({}, this.config, defaults);
|
||||
}
|
||||
|
||||
@@ -9,6 +9,11 @@ import {
|
||||
} from 'class-validator';
|
||||
import { Type } from 'class-transformer';
|
||||
import { IsDynamicObject } from '@waha/nestjs/validation/IsDynamicObject';
|
||||
import {
|
||||
ConversationSelectorConfig,
|
||||
ConversationSort,
|
||||
} from '@waha/apps/chatwoot/services/ConversationSelector';
|
||||
import { ConversationStatus } from '@waha/apps/chatwoot/client/types';
|
||||
|
||||
export const DEFAULT_LOCALE = 'en-US';
|
||||
|
||||
@@ -23,10 +28,20 @@ export enum LinkPreview {
|
||||
HQ = 'HG',
|
||||
}
|
||||
|
||||
export class ChatWootConversationsConfig {
|
||||
@IsEnum(ConversationSort)
|
||||
sort: ConversationSort;
|
||||
|
||||
@IsOptional()
|
||||
@IsEnum(ConversationStatus, { each: true })
|
||||
status: Array<ConversationStatus> | null;
|
||||
}
|
||||
|
||||
export interface ChatWootConfig {
|
||||
templates: Record<string, string>;
|
||||
linkPreview: LinkPreview;
|
||||
commands: ChatWootCommandsConfig;
|
||||
conversations: ChatWootConversationsConfig;
|
||||
}
|
||||
|
||||
export class ChatWootAppConfig implements ChatWootAPIConfig {
|
||||
@@ -56,7 +71,13 @@ export class ChatWootAppConfig implements ChatWootAPIConfig {
|
||||
@IsDynamicObject()
|
||||
templates?: Record<string, string>;
|
||||
|
||||
@IsOptional()
|
||||
@ValidateNested()
|
||||
@Type(() => ChatWootCommandsConfig)
|
||||
commands?: ChatWootCommandsConfig;
|
||||
|
||||
@IsOptional()
|
||||
@ValidateNested()
|
||||
@Type(() => ChatWootConversationsConfig)
|
||||
conversations?: ChatWootConversationsConfig;
|
||||
}
|
||||
@@ -11,8 +11,10 @@ import { Locale } from '@waha/apps/chatwoot/i18n/locale';
|
||||
import { Job } from 'bullmq';
|
||||
import { TKey } from '@waha/apps/chatwoot/i18n/templates';
|
||||
|
||||
const renderer: ErrorRenderer = new ErrorRenderer();
|
||||
|
||||
export class ChatWootErrorReporter {
|
||||
private errorRenderer: ErrorRenderer = new ErrorRenderer();
|
||||
private errorRenderer: ErrorRenderer = renderer;
|
||||
|
||||
constructor(
|
||||
private logger: ILogger,
|
||||
@@ -27,10 +29,22 @@ export class ChatWootErrorReporter {
|
||||
error: any,
|
||||
replyTo?: number,
|
||||
) {
|
||||
const errorText = this.errorRenderer.renderError(error);
|
||||
const errorText = this.errorRenderer.text(error);
|
||||
this.logger.error(errorText);
|
||||
try {
|
||||
const data = this.errorRenderer.data(error);
|
||||
this.logger.error(JSON.stringify(data, null, 2));
|
||||
} catch (err) {
|
||||
this.logger.error(`Error occurred while login details for error: ${err}`);
|
||||
}
|
||||
const template = this.l.key(TKey.JOB_REPORT_ERROR);
|
||||
const nextDelay = NextAttemptDelayInWholeSeconds(this.job);
|
||||
if (nextDelay) {
|
||||
// TODO: Add a way to enable it back in config
|
||||
// https://github.com/devlikeapro/waha/issues/1395
|
||||
// There's retries more left - ignore it for now
|
||||
return;
|
||||
}
|
||||
const attempts = {
|
||||
current: this.job.attemptsMade + 1,
|
||||
max: this.job.opts?.attempts || 1,
|
||||
@@ -69,9 +83,10 @@ export class ChatWootErrorReporter {
|
||||
type: MessageType,
|
||||
replyTo?: number,
|
||||
): Promise<void> {
|
||||
const jobUrl = `http://localhost:3000/jobs/queue/${encodeURIComponent(
|
||||
this.job.queueName,
|
||||
)}/${this.job.id}`;
|
||||
// TODO: Add a way to enable it back in config
|
||||
// https://github.com/devlikeapro/waha/issues/1395
|
||||
return null;
|
||||
|
||||
const template = this.l.key(TKey.JOB_REPORT_SUCCEEDED);
|
||||
const attempts = {
|
||||
current: this.job.attemptsMade + 1,
|
||||
@@ -79,10 +94,7 @@ export class ChatWootErrorReporter {
|
||||
};
|
||||
|
||||
const content = template.render({
|
||||
details: {
|
||||
text: `${this.job.queueName} => ${this.job.id}`,
|
||||
url: jobUrl,
|
||||
},
|
||||
details: JobLink(this.job),
|
||||
attempts: attempts,
|
||||
});
|
||||
|
||||
|
||||
@@ -1,45 +1,28 @@
|
||||
import { ApiError } from '@figuro/chatwoot-sdk/dist/core/ApiError';
|
||||
import { AxiosError } from 'axios';
|
||||
import { ApiError as ChatWootAPIError } from '@figuro/chatwoot-sdk/dist/core/ApiError';
|
||||
import type { AxiosError } from 'axios';
|
||||
|
||||
/**
|
||||
* Class responsible for rendering error information based on error type
|
||||
*/
|
||||
export class ErrorRenderer {
|
||||
interface IErrorRender<T> {
|
||||
/**
|
||||
* Renders error information based on error type
|
||||
* @param error The error to render
|
||||
* @returns Formatted error text
|
||||
* Get an error text to show to the user
|
||||
*/
|
||||
public renderError(error: any): string {
|
||||
// Handle Axios errors
|
||||
if (error.isAxiosError) {
|
||||
return this.renderAxiosError(error as AxiosError);
|
||||
}
|
||||
|
||||
// Handle Chatwoot SDK ApiError
|
||||
if (error instanceof ApiError) {
|
||||
return this.renderApiError(error);
|
||||
}
|
||||
|
||||
// For all other errors
|
||||
return this.renderGenericError(error);
|
||||
}
|
||||
text(error: T): string;
|
||||
|
||||
/**
|
||||
* Renders Axios error information
|
||||
* @param error The Axios error to render
|
||||
* @returns Formatted error text
|
||||
* Structured error data for logging/inspection
|
||||
*/
|
||||
private renderAxiosError(error: AxiosError): string {
|
||||
let errorText = `Axios Error: ${error.message}`;
|
||||
data(error: T): Record<string, any>;
|
||||
}
|
||||
|
||||
class AxiosErrorRenderer implements IErrorRender<AxiosError> {
|
||||
text(error: AxiosError): string {
|
||||
let errorText = `API Error: ${error.message}`;
|
||||
if (!error.response?.data) {
|
||||
return errorText;
|
||||
}
|
||||
|
||||
// Add response data if it exists and is JSON
|
||||
try {
|
||||
const data = error.response.data as any;
|
||||
let json: undefined;
|
||||
let json: any;
|
||||
if (Buffer.isBuffer(data)) {
|
||||
json = JSON.parse(data.toString());
|
||||
} else if (typeof data === 'object') {
|
||||
@@ -55,16 +38,35 @@ export class ErrorRenderer {
|
||||
return errorText;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders Chatwoot SDK ApiError information
|
||||
* @param error The ApiError to render
|
||||
* @returns Formatted error text
|
||||
*/
|
||||
private renderApiError(error: ApiError): string {
|
||||
data(error: AxiosError): Record<string, any> {
|
||||
const { config, response, request } = error as any;
|
||||
|
||||
return {
|
||||
class: 'APIError',
|
||||
request: {
|
||||
method: request?.method || config?.method,
|
||||
url: request?.path || config?.url,
|
||||
params: config?.params,
|
||||
body: request?.body || config?.data,
|
||||
},
|
||||
response: {
|
||||
status: response?.status,
|
||||
statusText: response?.statusText,
|
||||
headers: response?.headers,
|
||||
body: response?.data,
|
||||
},
|
||||
message: error.message,
|
||||
code: (error as any)?.code,
|
||||
stack: error.stack,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
class ChatWootAPIErrorRenderer implements IErrorRender<ChatWootAPIError> {
|
||||
text(error: ChatWootAPIError): string {
|
||||
let errorText = `ChatWoot API Error: ${error.message}`;
|
||||
errorText += `\nStatus: ${error.status}`;
|
||||
|
||||
// Add body if it exists
|
||||
if (error.body) {
|
||||
try {
|
||||
const body =
|
||||
@@ -78,12 +80,75 @@ export class ErrorRenderer {
|
||||
return errorText;
|
||||
}
|
||||
|
||||
data(error: ChatWootAPIError): Record<string, any> {
|
||||
return {
|
||||
class: 'ChatWootAPIError',
|
||||
request: {
|
||||
method: error.request?.method,
|
||||
url: error.request?.url,
|
||||
query: error.request?.query,
|
||||
path: error.request?.path,
|
||||
body: error.request?.body,
|
||||
},
|
||||
response: {
|
||||
status: error.status,
|
||||
statusText: error.statusText,
|
||||
body: error.body,
|
||||
},
|
||||
message: error.message,
|
||||
stack: error.stack,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
class GenericErrorRenderer implements IErrorRender<any> {
|
||||
text(error: any): string {
|
||||
return error?.toString?.() ?? String(error);
|
||||
}
|
||||
|
||||
data(error: any): Record<string, any> {
|
||||
return {
|
||||
class: error?.name ?? error?.constructor?.name ?? typeof error,
|
||||
message: error?.message ?? String(error),
|
||||
stack: error.stack,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Class responsible for rendering error information based on error type
|
||||
*/
|
||||
export class ErrorRenderer implements IErrorRender<any> {
|
||||
private readonly axiosRenderer = new AxiosErrorRenderer();
|
||||
private readonly chatwootRenderer = new ChatWootAPIErrorRenderer();
|
||||
private readonly genericRenderer = new GenericErrorRenderer();
|
||||
|
||||
/**
|
||||
* Renders generic error information
|
||||
* Renders error information based on error type
|
||||
* @param error The error to render
|
||||
* @returns Formatted error text
|
||||
*/
|
||||
private renderGenericError(error: any): string {
|
||||
return error.toString();
|
||||
public text(error: any): string {
|
||||
if (error?.isAxiosError) {
|
||||
return this.axiosRenderer.text(error as AxiosError);
|
||||
}
|
||||
|
||||
if (error instanceof ChatWootAPIError) {
|
||||
return this.chatwootRenderer.text(error);
|
||||
}
|
||||
|
||||
return this.genericRenderer.text(error);
|
||||
}
|
||||
|
||||
public data(error: any): Record<string, any> {
|
||||
if (error?.isAxiosError) {
|
||||
return this.axiosRenderer.data(error as AxiosError);
|
||||
}
|
||||
|
||||
if (error instanceof ChatWootAPIError) {
|
||||
return this.chatwootRenderer.data(error);
|
||||
}
|
||||
|
||||
return this.genericRenderer.data(error);
|
||||
}
|
||||
}
|
||||
@@ -9,3 +9,9 @@ export class PhoneNumberNotFoundInWhatsAppError extends Error {
|
||||
super(`Phone number not found in WhatsApp: ${phone}`);
|
||||
}
|
||||
}
|
||||
|
||||
export class UnknownJIDFormat extends Error {
|
||||
constructor(public jid: string) {
|
||||
super(`WhatsApp Chat ID is not recognized: ${jid}`);
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,19 @@
|
||||
import * as Mustache from 'mustache';
|
||||
import { TemplatePayloads, TKey } from '@waha/apps/chatwoot/i18n/templates';
|
||||
import Long from 'long';
|
||||
import { ensureNumber } from '@waha/core/engines/noweb/utils';
|
||||
|
||||
export class Locale {
|
||||
constructor(private readonly strings: Record<string, string>) {}
|
||||
|
||||
/**
|
||||
* Return Base Locale
|
||||
* For number, datetime, currency formats
|
||||
*/
|
||||
get locale(): string {
|
||||
return this.strings['locale.base'] || 'en';
|
||||
}
|
||||
|
||||
key<K extends TKey>(key: K): Template<K> {
|
||||
return new Template(this.strings[key] || key);
|
||||
}
|
||||
@@ -15,13 +25,64 @@ export class Locale {
|
||||
override(strings: Record<string, string>): Locale {
|
||||
return new Locale({ ...this.strings, ...strings });
|
||||
}
|
||||
|
||||
FormatCurrency(
|
||||
currency: string,
|
||||
value: number | null,
|
||||
offset: number = 1,
|
||||
): string | null {
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
if (!currency) {
|
||||
return null;
|
||||
}
|
||||
|
||||
offset = offset || 1;
|
||||
try {
|
||||
const fmt = new Intl.NumberFormat(this.locale, {
|
||||
style: 'currency',
|
||||
currency: currency,
|
||||
});
|
||||
return fmt.format(value / offset);
|
||||
} catch (err) {
|
||||
return `${currency} ${value}`;
|
||||
}
|
||||
}
|
||||
|
||||
FormatDatetime(date: Date | null): string | null {
|
||||
if (!date) {
|
||||
return null;
|
||||
}
|
||||
const options: any = this.strings['datetime'] || {};
|
||||
options.timeZone = options.timeZone || options.timezone || process.env.TZ;
|
||||
return date.toLocaleString(this.locale, options);
|
||||
}
|
||||
|
||||
FormatTimestamp(timestamp: Long | string | number | null): string | null {
|
||||
const value = ensureNumber(timestamp);
|
||||
if (!value) {
|
||||
return undefined;
|
||||
}
|
||||
if (!Number.isFinite(value)) {
|
||||
return undefined;
|
||||
}
|
||||
const milliseconds = value >= 1e12 ? value : value * 1000;
|
||||
const date = new Date(milliseconds);
|
||||
if (Number.isNaN(date.getTime())) {
|
||||
return undefined;
|
||||
}
|
||||
return this.FormatDatetime(date);
|
||||
}
|
||||
}
|
||||
|
||||
export class Template<K extends TKey> {
|
||||
constructor(private readonly template: string) {}
|
||||
|
||||
render(data: TemplatePayloads[K]): string {
|
||||
return Mustache.render(this.template, data);
|
||||
const text = Mustache.render(this.template, data);
|
||||
// Remove /n at the end if any
|
||||
return text.replace(/\n$/, '');
|
||||
}
|
||||
|
||||
r(data: TemplatePayloads[K]): string {
|
||||
|
||||
@@ -1,9 +1,29 @@
|
||||
# Arabic translations for ChatWoot integration
|
||||
locale.name: '🇦🇪 العربية (Arabic)'
|
||||
app.inbox.contact.name: 'تكامل واتساب (WAHA)'
|
||||
|
||||
# رمز اللغة الأساسي - يجب أن يكون محليًا صالحًا وفق BCP 47
|
||||
# https://en.wikipedia.org/wiki/IETF_language_tag
|
||||
# تستخدمه WAHA لعرض الأرقام والعملات والتاريخ/الوقت
|
||||
locale.base: 'ar-AE'
|
||||
|
||||
app.inbox.contact.name: 'تكامل واتساب'
|
||||
app.inbox.contact.avatar.url: 'https://raw.githubusercontent.com/devlikeapro/waha/core/logo.png'
|
||||
|
||||
job.report.error: |
|
||||
# "options" من date.toLocaleString
|
||||
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options
|
||||
datetime:
|
||||
locales: ar-AE
|
||||
day: 2-digit
|
||||
month: 2-digit
|
||||
year: numeric
|
||||
hour: 2-digit
|
||||
minute: 2-digit
|
||||
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#timezonename
|
||||
timeZoneName: shortGeneric
|
||||
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
# timeZone: 'Asia/Dubai'
|
||||
|
||||
job.report.error: |-
|
||||
⚠️ **{{{header}}}**
|
||||
{{#attempts.nextDelay}}
|
||||
🔄 إعادة المحاولة في {{attempts.nextDelay}} ثانية...
|
||||
@@ -20,7 +40,7 @@ job.report.error: |
|
||||
```
|
||||
{{/error}}
|
||||
|
||||
job.report.succeeded: |
|
||||
job.report.succeeded: |-
|
||||
✅ **نجاح**
|
||||
المحاولة: {{{attempts.current}}} / {{{attempts.max}}}
|
||||
التفاصيل: [{{{details.text}}}]({{{details.url}}})
|
||||
@@ -30,33 +50,33 @@ whatsapp.message.receiving.error: تعذر استلام رسالة من واتس
|
||||
whatsapp.message.removing.error: تعذر إزالة رسالة من واتساب
|
||||
job.scheduled.error.header: فشل تنفيذ المهمة المجدولة
|
||||
|
||||
message.from.whatsapp: |
|
||||
message.from.whatsapp: |-
|
||||
{{{text}}}
|
||||
|
||||
📱 *أرسلت من واتساب*
|
||||
|
||||
message.from.api: |
|
||||
message.from.api: |-
|
||||
{{{text}}}
|
||||
|
||||
📱 *أرسلت عبر API*
|
||||
|
||||
message.removed.in.whatsapp: |
|
||||
message.removed.in.whatsapp: |-
|
||||
❌ *تم حذف هذه الرسالة في واتساب*
|
||||
|
||||
message.edited.in.whatsapp: |
|
||||
message.edited.in.whatsapp: |-
|
||||
{{{text}}}
|
||||
|
||||
✏️ *تم تعديلها في واتساب*
|
||||
|
||||
whatsapp.group.message: |
|
||||
{{{text}}}
|
||||
|
||||
whatsapp.group.message: |-
|
||||
👥 *{{{participant}}}*
|
||||
|
||||
whatsapp.reaction.added: |
|
||||
{{{text}}}
|
||||
|
||||
whatsapp.reaction.added: |-
|
||||
*تفاعل* {{{emoji}}}
|
||||
|
||||
whatsapp.reaction.removed: |
|
||||
whatsapp.reaction.removed: |-
|
||||
*تمت إزالة التفاعل*
|
||||
|
||||
whatsapp.contact.group.suffix: 'مجموعة'
|
||||
@@ -65,7 +85,7 @@ whatsapp.contact.broadcast.suffix: 'قائمة البث'
|
||||
# Aka Stories
|
||||
whatsapp.contact.status.name: 'الحالة'
|
||||
|
||||
app.connected.message: |
|
||||
app.connected.message: |-
|
||||
🔗 **متصل: جلسة واتساب إلى صندوق وارد ChatWoot**
|
||||
|
||||
✅ تم توصيل جلسة واتساب **{{{name}}}** بنجاح بصندوق وارد ChatWoot هذا.
|
||||
@@ -83,7 +103,7 @@ app.connected.message: |
|
||||
|
||||
لنبدأ! 🚀
|
||||
|
||||
app.disconnected.message: |
|
||||
app.disconnected.message: |-
|
||||
🔌 **غير متصل: جلسة واتساب من صندوق وارد ChatWoot**
|
||||
|
||||
❌ تم قطع اتصال جلسة واتساب **{{{name}}}** من صندوق وارد ChatWoot هذا.
|
||||
@@ -92,12 +112,12 @@ app.disconnected.message: |
|
||||
|
||||
لإعادة الاتصال، يرجى الاتصال بالمسؤول الخاص بك.
|
||||
|
||||
app.updated.message: |
|
||||
app.updated.message: |-
|
||||
🔄 **تم التحديث: إعدادات جلسة واتساب**
|
||||
|
||||
✅ تم تحديث إعدادات جلسة واتساب **{{{name}}}**.
|
||||
|
||||
app.commands.list: |
|
||||
app.commands.list: |-
|
||||
يمكنك إدارة **تكامل واتساب** عن طريق إرسال أحد الأوامر التالية:
|
||||
|
||||
🖥️ **الجلسة**:
|
||||
@@ -125,32 +145,32 @@ app.commands.server.disabled: ⛔ **تم تعطيل أوامر الخادم**.
|
||||
|
||||
أرسل **help** للحصول على قائمة الأوامر المتاحة.
|
||||
|
||||
app.help.reminder: |
|
||||
app.help.reminder: |-
|
||||
أرسل **help** للحصول على قائمة الأوامر المتاحة.
|
||||
|
||||
app.session.status.change: |
|
||||
app.session.status.change: |-
|
||||
{{{emoji}}} تم تغيير حالة جلسة "{{{session}}}" إلى {{{status}}}
|
||||
|
||||
app.session.current.status: |
|
||||
app.session.current.status: |-
|
||||
{{{emoji}}} حالة جلسة **{{{session}}}** هي **{{{status}}}**
|
||||
**حساب واتساب:**
|
||||
|
||||
📱 **{{{name}}} ({{{id}}})**
|
||||
|
||||
app.session.status.working: |
|
||||
app.session.status.working: |-
|
||||
✅ صندوق وارد ChatWoot هذا مرتبط بـ **حساب واتساب** وجاهز لإرسال واستقبال الرسائل!
|
||||
|
||||
📱 **{{{name}}} ({{{id}}})**
|
||||
|
||||
app.session.status.error: |
|
||||
app.session.status.error: |-
|
||||
⚠️ **صندوق وارد ChatWoot هذا مرتبط بحساب واتساب ولكنه غير جاهز لإرسال واستقبال الرسائل!**
|
||||
|
||||
يرجى التحقق من حالة الجلسة ومحاولة إعادة تشغيلها أو تسجيل الخروج ومسح رمز QR مرة أخرى.
|
||||
|
||||
app.session.scan.qr.code: |
|
||||
app.session.scan.qr.code: |-
|
||||
⚠️ **امسح رمز QR على هاتفك لربط حساب واتساب بصندوق وارد ChatWoot هذا!**
|
||||
|
||||
app.server.version.and.status: |
|
||||
app.server.version.and.status: |-
|
||||
**الإصدار:**
|
||||
```
|
||||
{{{version}}}
|
||||
@@ -161,16 +181,16 @@ app.server.version.and.status: |
|
||||
{{{status}}}
|
||||
```
|
||||
|
||||
app.server.reboot: |
|
||||
app.server.reboot: |-
|
||||
يتم إعادة تشغيل الخادم بسلاسة...
|
||||
|
||||
app.server.reboot.force: |
|
||||
app.server.reboot.force: |-
|
||||
يتم إعادة تشغيل الخادم بالقوة...
|
||||
|
||||
app.logout.success: |
|
||||
app.logout.success: |-
|
||||
✅ تم إلغاء تفويض الحساب بنجاح!
|
||||
|
||||
waha.new.version.available: |
|
||||
waha.new.version.available: |-
|
||||
🔄 **إصدار جديد متاح!**
|
||||
|
||||
الإصدار الحالي: **{{{currentVersion}}}**
|
||||
@@ -178,7 +198,7 @@ waha.new.version.available: |
|
||||
|
||||
👉 تحقق مما هو جديد في [**🆕 سجل التغييرات**]({{{changelogUrl}}})
|
||||
|
||||
waha.core.version.used: |
|
||||
waha.core.version.used: |-
|
||||
❤️ **ادعم WAHA!**
|
||||
|
||||
أنت تستخدم إصدار **WAHA Core** المجاني. إذا وجدت هذا المشروع مفيدًا، فيرجى التفكير في دعم تطويره.
|
||||
@@ -187,20 +207,20 @@ waha.core.version.used: |
|
||||
|
||||
[**🎁 ادعمنا**]({{{supportUrl}}})
|
||||
|
||||
chatwoot.to.whatsapp.message.text: |
|
||||
chatwoot.to.whatsapp.message.text: |-
|
||||
{{{ content }}}
|
||||
|
||||
chatwoot.to.whatsapp.message.media.caption: |
|
||||
chatwoot.to.whatsapp.message.media.caption: |-
|
||||
{{#singleAttachment}}
|
||||
{{#content}}
|
||||
{{{ content }}}
|
||||
{{/content}}
|
||||
{{/singleAttachment}}
|
||||
|
||||
whatsapp.to.chatwoot.message: |
|
||||
whatsapp.to.chatwoot.message: |-
|
||||
{{{payload.body}}}
|
||||
|
||||
whatsapp.to.chatwoot.message.contacts: |
|
||||
whatsapp.to.chatwoot.message.contacts: |-
|
||||
👤 **جهات الاتصال المشتركة**
|
||||
|
||||
{{#contacts}}
|
||||
@@ -211,12 +231,24 @@ whatsapp.to.chatwoot.message.contacts: |
|
||||
|
||||
{{/contacts}}
|
||||
|
||||
whatsapp.to.chatwoot.message.location: |
|
||||
whatsapp.to.chatwoot.message.location: |-
|
||||
{{#message}}
|
||||
{{#locationMessage}}
|
||||
📍 **الموقع المشترك**
|
||||
|
||||
https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#name}}
|
||||
**{{name}}**
|
||||
{{/name}}
|
||||
|
||||
{{#address}}
|
||||
📍 **العنوان:** {{address}}
|
||||
{{/address}}
|
||||
|
||||
{{#url}}
|
||||
🌐 **الموقع الإلكتروني:** {{url}}
|
||||
{{/url}}
|
||||
|
||||
🔗 **عرض على الخريطة:** https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#caption}}{{caption}}{{/caption}}
|
||||
{{/locationMessage}}
|
||||
|
||||
@@ -224,13 +256,127 @@ whatsapp.to.chatwoot.message.location: |
|
||||
📍📡 **مشاركة الموقع المباشر**
|
||||
افتح **WhatsApp** لعرض التحديثات اللحظية.
|
||||
|
||||
https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#name}}
|
||||
**{{name}}**
|
||||
{{/name}}
|
||||
|
||||
{{#address}}
|
||||
📍 **العنوان:** {{address}}
|
||||
{{/address}}
|
||||
|
||||
{{#url}}
|
||||
🌐 **الموقع الإلكتروني:** {{url}}
|
||||
{{/url}}
|
||||
|
||||
🔗 **عرض على الخريطة:** https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#caption}}{{caption}}{{/caption}}
|
||||
{{/liveLocationMessage}}
|
||||
{{/message}}
|
||||
|
||||
whatsapp.to.chatwoot.message.unsupported: |
|
||||
whatsapp.to.chatwoot.message.poll: |-
|
||||
{{#poll}}
|
||||
📊 **استطلاع**
|
||||
|
||||
**{{name}}**
|
||||
{{#options}}
|
||||
- {{optionName}}
|
||||
{{/options}}
|
||||
{{/poll}}
|
||||
|
||||
whatsapp.to.chatwoot.message.list: |-
|
||||
{{#message.listMessage}}
|
||||
{{#title}}
|
||||
*{{{title}}}*
|
||||
{{/title}}
|
||||
{{#description}}
|
||||
{{{description}}}
|
||||
{{/description}}
|
||||
{{#footerText}}
|
||||
{{{footerText}}}
|
||||
{{/footerText}}
|
||||
|
||||
{{#buttonText}}
|
||||
{{{buttonText}}}
|
||||
{{/buttonText}}
|
||||
{{#sections}}
|
||||
{{#title}}
|
||||
{{{title}}}:
|
||||
{{/title}}
|
||||
{{#rows}}
|
||||
{{#title}}
|
||||
- {{{title}}}
|
||||
{{/title}}
|
||||
{{/rows}}
|
||||
|
||||
{{/sections}}
|
||||
{{/message.listMessage}}
|
||||
|
||||
whatsapp.to.chatwoot.message.event: |-
|
||||
{{#message}}
|
||||
{{#eventMessage}}
|
||||
📅 **حدث**
|
||||
|
||||
**{{name}}**
|
||||
{{#description}}
|
||||
{{description}}
|
||||
{{/description}}
|
||||
|
||||
{{#location.name}}
|
||||
📍 **الموقع:** {{location.name}}
|
||||
{{/location.name}}
|
||||
{{#startTime}}
|
||||
🕐 **البدء:** {{startTime}}
|
||||
{{/startTime}}
|
||||
{{#endTime}}
|
||||
🕐 **الانتهاء:** {{endTime}}
|
||||
{{/endTime}}
|
||||
{{#joinLink}}
|
||||
🔗 **رابط الانضمام:** [{{joinLink}}]({{joinLink}})
|
||||
{{/joinLink}}
|
||||
{{/eventMessage}}
|
||||
{{/message}}
|
||||
|
||||
whatsapp.to.chatwoot.message.pix: |-
|
||||
💳 **PIX - نسخ ولصق**
|
||||
|
||||
{{#pixData}}
|
||||
{{#merchantName}}
|
||||
**{{merchantName}}**
|
||||
{{/merchantName}}
|
||||
|
||||
{{#key}}
|
||||
**مفتاح PIX:** {{key}}
|
||||
{{/key}}
|
||||
{{#keyType}}
|
||||
**النوع:** {{keyType}}
|
||||
{{/keyType}}
|
||||
{{#totalAmount}}
|
||||
**المبلغ:** {{totalAmountFormatted}}
|
||||
{{/totalAmount}}
|
||||
{{#referenceId}}
|
||||
**المرجع:** {{referenceId}}
|
||||
{{/referenceId}}
|
||||
|
||||
💳 **تم إرسال PIX نسخ ولصق**
|
||||
{{/pixData}}
|
||||
|
||||
whatsapp.to.chatwoot.message.unsupported: |-
|
||||
⚠️ **هذا النوع من الرسائل غير مدعوم في ChatWoot.**
|
||||
📱 يرجى فتح **WhatsApp** لعرضه.
|
||||
|
||||
التفاصيل: [{{{details.text}}}]({{{details.url}}})
|
||||
|
||||
whatsapp.to.chatwoot.message.facebook.ad: |-
|
||||
📢 **إعلان فيسبوك**
|
||||
|
||||
**العنوان:** {{{adData.title}}}
|
||||
|
||||
**الوصف:**
|
||||
{{{adData.body}}}
|
||||
|
||||
**رابط الإعلان:** [عرض على فيسبوك]({{{adData.sourceUrl}}})
|
||||
**معرّف الإعلان:** {{{adData.sourceId}}}
|
||||
|
||||
---
|
||||
💬 **رسالة العميل:**
|
||||
{{{payload.body}}}
|
||||
@@ -1,9 +1,29 @@
|
||||
# Bengali translations for ChatWoot integration
|
||||
locale.name: '🇧🇩 বাংলা (Bengali)'
|
||||
app.inbox.contact.name: 'হোয়াটসঅ্যাপ ইন্টিগ্রেশন (WAHA)'
|
||||
|
||||
# বেস লোকেল কোড - এটি একটি বৈধ BCP 47 লোকেল হতে হবে
|
||||
# https://en.wikipedia.org/wiki/IETF_language_tag
|
||||
# WAHA এটি সংখ্যা, মুদ্রা এবং তারিখ/সময়ের ফরম্যাটিংয়ে ব্যবহার করে।
|
||||
locale.base: 'bn-BD'
|
||||
|
||||
app.inbox.contact.name: 'হোয়াটসঅ্যাপ ইন্টিগ্রেশন'
|
||||
app.inbox.contact.avatar.url: 'https://raw.githubusercontent.com/devlikeapro/waha/core/logo.png'
|
||||
|
||||
job.report.error: |
|
||||
# date.toLocaleString এর "options"
|
||||
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options
|
||||
datetime:
|
||||
locales: bn-BD
|
||||
day: 2-digit
|
||||
month: 2-digit
|
||||
year: numeric
|
||||
hour: 2-digit
|
||||
minute: 2-digit
|
||||
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#timezonename
|
||||
timeZoneName: shortGeneric
|
||||
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
# timeZone: 'Asia/Dhaka'
|
||||
|
||||
job.report.error: |-
|
||||
⚠️ **{{{header}}}**
|
||||
{{#attempts.nextDelay}}
|
||||
🔄 {{attempts.nextDelay}} সেকেন্ডের মধ্যে পুনরায় চেষ্টা করা হচ্ছে...
|
||||
@@ -20,7 +40,7 @@ job.report.error: |
|
||||
```
|
||||
{{/error}}
|
||||
|
||||
job.report.succeeded: |
|
||||
job.report.succeeded: |-
|
||||
✅ **সফল হয়েছে**
|
||||
প্রচেষ্টা: {{{attempts.current}}} / {{{attempts.max}}}
|
||||
বিবরণ: [{{{details.text}}}]({{{details.url}}})
|
||||
@@ -30,33 +50,33 @@ whatsapp.message.receiving.error: হোয়াটসঅ্যাপ থেক
|
||||
whatsapp.message.removing.error: হোয়াটসঅ্যাপ থেকে বার্তা সরাতে পারেনি
|
||||
job.scheduled.error.header: নির্ধারিত কাজ সম্পাদন করতে ব্যর্থ হয়েছে
|
||||
|
||||
message.from.whatsapp: |
|
||||
message.from.whatsapp: |-
|
||||
{{{text}}}
|
||||
|
||||
📱 *হোয়াটসঅ্যাপ থেকে পাঠানো হয়েছে*
|
||||
|
||||
message.from.api: |
|
||||
message.from.api: |-
|
||||
{{{text}}}
|
||||
|
||||
📱 *API এর মাধ্যমে পাঠানো হয়েছে*
|
||||
|
||||
message.removed.in.whatsapp: |
|
||||
message.removed.in.whatsapp: |-
|
||||
❌ *এই বার্তাটি হোয়াটসঅ্যাপে মুছে ফেলা হয়েছে*
|
||||
|
||||
message.edited.in.whatsapp: |
|
||||
message.edited.in.whatsapp: |-
|
||||
{{{text}}}
|
||||
|
||||
✏️ *হোয়াটসঅ্যাপে সম্পাদিত*
|
||||
|
||||
whatsapp.group.message: |
|
||||
{{{text}}}
|
||||
|
||||
whatsapp.group.message: |-
|
||||
👥 *{{{participant}}}*
|
||||
|
||||
whatsapp.reaction.added: |
|
||||
{{{text}}}
|
||||
|
||||
whatsapp.reaction.added: |-
|
||||
*প্রতিক্রিয়া দিয়েছেন* {{{emoji}}}
|
||||
|
||||
whatsapp.reaction.removed: |
|
||||
whatsapp.reaction.removed: |-
|
||||
*প্রতিক্রিয়া সরানো হয়েছে*
|
||||
|
||||
whatsapp.contact.group.suffix: 'গ্রুপ'
|
||||
@@ -65,7 +85,7 @@ whatsapp.contact.broadcast.suffix: 'প্রচার তালিকা'
|
||||
# Aka Stories
|
||||
whatsapp.contact.status.name: 'স্ট্যাটাস'
|
||||
|
||||
app.connected.message: |
|
||||
app.connected.message: |-
|
||||
🔗 **সংযুক্ত: হোয়াটসঅ্যাপ সেশন থেকে ChatWoot ইনবক্স**
|
||||
|
||||
✅ হোয়াটসঅ্যাপ সেশন **{{{name}}}** সফলভাবে এই ChatWoot ইনবক্সের সাথে সংযুক্ত করা হয়েছে।
|
||||
@@ -83,7 +103,7 @@ app.connected.message: |
|
||||
|
||||
চলুন শুরু করা যাক! 🚀
|
||||
|
||||
app.disconnected.message: |
|
||||
app.disconnected.message: |-
|
||||
🔌 **সংযোগ বিচ্ছিন্ন: হোয়াটসঅ্যাপ সেশন থেকে ChatWoot ইনবক্স**
|
||||
|
||||
❌ হোয়াটসঅ্যাপ সেশন **{{{name}}}** এই ChatWoot ইনবক্স থেকে সংযোগ বিচ্ছিন্ন করা হয়েছে।
|
||||
@@ -92,12 +112,12 @@ app.disconnected.message: |
|
||||
|
||||
পুনরায় সংযোগ করতে, অনুগ্রহ করে আপনার প্রশাসকের সাথে যোগাযোগ করুন।
|
||||
|
||||
app.updated.message: |
|
||||
app.updated.message: |-
|
||||
🔄 **আপডেট করা হয়েছে: হোয়াটসঅ্যাপ সেশন সেটিংস**
|
||||
|
||||
✅ হোয়াটসঅ্যাপ সেশন **{{{name}}}** এর সেটিংস আপডেট করা হয়েছে।
|
||||
|
||||
app.commands.list: |
|
||||
app.commands.list: |-
|
||||
আপনি নিম্নলিখিত কমান্ডগুলির একটি পাঠিয়ে **হোয়াটসঅ্যাপ ইন্টিগ্রেশন** পরিচালনা করতে পারেন:
|
||||
|
||||
🖥️ **সেশন**:
|
||||
@@ -125,32 +145,32 @@ app.commands.server.disabled: ⛔ **সার্ভার কমান্ড ন
|
||||
|
||||
উপলব্ধ কমান্ডের তালিকা পেতে **help** পাঠান।
|
||||
|
||||
app.help.reminder: |
|
||||
app.help.reminder: |-
|
||||
উপলব্ধ কমান্ডগুলির তালিকা পেতে **help** পাঠান।
|
||||
|
||||
app.session.status.change: |
|
||||
app.session.status.change: |-
|
||||
{{{emoji}}} "{{{session}}}" সেশন {{{status}}} স্ট্যাটাসে পরিবর্তিত হয়েছে
|
||||
|
||||
app.session.current.status: |
|
||||
app.session.current.status: |-
|
||||
{{{emoji}}} **{{{session}}}** সেশনের স্ট্যাটাস **{{{status}}}**
|
||||
**হোয়াটসঅ্যাপ অ্যাকাউন্ট:**
|
||||
|
||||
📱 **{{{name}}} ({{{id}}})**
|
||||
|
||||
app.session.status.working: |
|
||||
app.session.status.working: |-
|
||||
✅ এই ChatWoot ইনবক্স **হোয়াটসঅ্যাপ অ্যাকাউন্টের** সাথে সংযুক্ত এবং বার্তা পাঠাতে ও গ্রহণ করতে প্রস্তুত!
|
||||
|
||||
📱 **{{{name}}} ({{{id}}})**
|
||||
|
||||
app.session.status.error: |
|
||||
app.session.status.error: |-
|
||||
⚠️ **এই ChatWoot ইনবক্স হোয়াটসঅ্যাপ অ্যাকাউন্টের সাথে সংযুক্ত কিন্তু বার্তা পাঠাতে ও গ্রহণ করতে প্রস্তুত নয়!**
|
||||
|
||||
অনুগ্রহ করে সেশনের স্ট্যাটাস পরীক্ষা করুন এবং এটি পুনরায় চালু করার চেষ্টা করুন অথবা লগআউট করুন এবং QR কোড আবার স্ক্যান করুন।
|
||||
|
||||
app.session.scan.qr.code: |
|
||||
app.session.scan.qr.code: |-
|
||||
⚠️ **এই ChatWoot ইনবক্সের সাথে হোয়াটসঅ্যাপ অ্যাকাউন্ট লিঙ্ক করতে আপনার ফোনে QR কোড স্ক্যান করুন!**
|
||||
|
||||
app.server.version.and.status: |
|
||||
app.server.version.and.status: |-
|
||||
**সংস্করণ:**
|
||||
```
|
||||
{{{version}}}
|
||||
@@ -161,16 +181,16 @@ app.server.version.and.status: |
|
||||
{{{status}}}
|
||||
```
|
||||
|
||||
app.server.reboot: |
|
||||
app.server.reboot: |-
|
||||
সার্ভার সুন্দরভাবে পুনরায় চালু হচ্ছে...
|
||||
|
||||
app.server.reboot.force: |
|
||||
app.server.reboot.force: |-
|
||||
সার্ভার জোর করে পুনরায় চালু হচ্ছে...
|
||||
|
||||
app.logout.success: |
|
||||
app.logout.success: |-
|
||||
✅ অ্যাকাউন্ট সফলভাবে অননুমোদিত করা হয়েছে!
|
||||
|
||||
waha.new.version.available: |
|
||||
waha.new.version.available: |-
|
||||
🔄 **নতুন সংস্করণ উপলব্ধ!**
|
||||
|
||||
বর্তমান সংস্করণ: **{{{currentVersion}}}**
|
||||
@@ -178,7 +198,7 @@ waha.new.version.available: |
|
||||
|
||||
👉 [**🆕 পরিবর্তন লগ**]({{{changelogUrl}}}) এ নতুন কি আছে তা দেখুন
|
||||
|
||||
waha.core.version.used: |
|
||||
waha.core.version.used: |-
|
||||
❤️ **WAHA সমর্থন করুন!**
|
||||
|
||||
আপনি বিনামূল্যের **WAHA Core** সংস্করণ ব্যবহার করছেন। যদি আপনি এই প্রকল্পটি উপযোগী মনে করেন, তবে এর বিকাশকে সমর্থন করার কথা বিবেচনা করুন।
|
||||
@@ -187,20 +207,20 @@ waha.core.version.used: |
|
||||
|
||||
[**🎁 আমাদের সমর্থন করুন**]({{{supportUrl}}})
|
||||
|
||||
chatwoot.to.whatsapp.message.text: |
|
||||
chatwoot.to.whatsapp.message.text: |-
|
||||
{{{ content }}}
|
||||
|
||||
chatwoot.to.whatsapp.message.media.caption: |
|
||||
chatwoot.to.whatsapp.message.media.caption: |-
|
||||
{{#singleAttachment}}
|
||||
{{#content}}
|
||||
{{{ content }}}
|
||||
{{/content}}
|
||||
{{/singleAttachment}}
|
||||
|
||||
whatsapp.to.chatwoot.message: |
|
||||
whatsapp.to.chatwoot.message: |-
|
||||
{{{payload.body}}}
|
||||
|
||||
whatsapp.to.chatwoot.message.contacts: |
|
||||
whatsapp.to.chatwoot.message.contacts: |-
|
||||
👤 **শেয়ার করা যোগাযোগ**
|
||||
|
||||
{{#contacts}}
|
||||
@@ -211,12 +231,24 @@ whatsapp.to.chatwoot.message.contacts: |
|
||||
|
||||
{{/contacts}}
|
||||
|
||||
whatsapp.to.chatwoot.message.location: |
|
||||
whatsapp.to.chatwoot.message.location: |-
|
||||
{{#message}}
|
||||
{{#locationMessage}}
|
||||
📍 **শেয়ার করা লোকেশন**
|
||||
|
||||
https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#name}}
|
||||
**{{name}}**
|
||||
{{/name}}
|
||||
|
||||
{{#address}}
|
||||
📍 **ঠিকানা:** {{address}}
|
||||
{{/address}}
|
||||
|
||||
{{#url}}
|
||||
🌐 **ওয়েবসাইট:** {{url}}
|
||||
{{/url}}
|
||||
|
||||
🔗 **মানচিত্রে দেখুন:** https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#caption}}{{caption}}{{/caption}}
|
||||
{{/locationMessage}}
|
||||
|
||||
@@ -224,13 +256,127 @@ whatsapp.to.chatwoot.message.location: |
|
||||
📍📡 **লাইভ লোকেশন শেয়ার করা হচ্ছে**
|
||||
রিয়েল-টাইম আপডেট দেখতে **WhatsApp** খুলুন।
|
||||
|
||||
https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#name}}
|
||||
**{{name}}**
|
||||
{{/name}}
|
||||
|
||||
{{#address}}
|
||||
📍 **ঠিকানা:** {{address}}
|
||||
{{/address}}
|
||||
|
||||
{{#url}}
|
||||
🌐 **ওয়েবসাইট:** {{url}}
|
||||
{{/url}}
|
||||
|
||||
🔗 **মানচিত্রে দেখুন:** https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#caption}}{{caption}}{{/caption}}
|
||||
{{/liveLocationMessage}}
|
||||
{{/message}}
|
||||
|
||||
whatsapp.to.chatwoot.message.unsupported: |
|
||||
whatsapp.to.chatwoot.message.poll: |-
|
||||
{{#poll}}
|
||||
📊 **জরিপ**
|
||||
|
||||
**{{name}}**
|
||||
{{#options}}
|
||||
- {{optionName}}
|
||||
{{/options}}
|
||||
{{/poll}}
|
||||
|
||||
whatsapp.to.chatwoot.message.list: |-
|
||||
{{#message.listMessage}}
|
||||
{{#title}}
|
||||
*{{{title}}}*
|
||||
{{/title}}
|
||||
{{#description}}
|
||||
{{{description}}}
|
||||
{{/description}}
|
||||
{{#footerText}}
|
||||
{{{footerText}}}
|
||||
{{/footerText}}
|
||||
|
||||
{{#buttonText}}
|
||||
{{{buttonText}}}
|
||||
{{/buttonText}}
|
||||
{{#sections}}
|
||||
{{#title}}
|
||||
{{{title}}}:
|
||||
{{/title}}
|
||||
{{#rows}}
|
||||
{{#title}}
|
||||
- {{{title}}}
|
||||
{{/title}}
|
||||
{{/rows}}
|
||||
|
||||
{{/sections}}
|
||||
{{/message.listMessage}}
|
||||
|
||||
whatsapp.to.chatwoot.message.event: |-
|
||||
{{#message}}
|
||||
{{#eventMessage}}
|
||||
📅 **ইভেন্ট**
|
||||
|
||||
**{{name}}**
|
||||
{{#description}}
|
||||
{{description}}
|
||||
{{/description}}
|
||||
|
||||
{{#location.name}}
|
||||
📍 **স্থান:** {{location.name}}
|
||||
{{/location.name}}
|
||||
{{#startTime}}
|
||||
🕐 **শুরুর সময়:** {{startTime}}
|
||||
{{/startTime}}
|
||||
{{#endTime}}
|
||||
🕐 **শেষের সময়:** {{endTime}}
|
||||
{{/endTime}}
|
||||
{{#joinLink}}
|
||||
🔗 **যোগদানের লিঙ্ক:** [{{joinLink}}]({{joinLink}})
|
||||
{{/joinLink}}
|
||||
{{/eventMessage}}
|
||||
{{/message}}
|
||||
|
||||
whatsapp.to.chatwoot.message.pix: |-
|
||||
💳 **PIX - কপি এবং পেস্ট**
|
||||
|
||||
{{#pixData}}
|
||||
{{#merchantName}}
|
||||
**{{merchantName}}**
|
||||
{{/merchantName}}
|
||||
|
||||
{{#key}}
|
||||
**PIX কী:** {{key}}
|
||||
{{/key}}
|
||||
{{#keyType}}
|
||||
**ধরন:** {{keyType}}
|
||||
{{/keyType}}
|
||||
{{#totalAmount}}
|
||||
**পরিমাণ:** {{totalAmountFormatted}}
|
||||
{{/totalAmount}}
|
||||
{{#referenceId}}
|
||||
**রেফারেন্স:** {{referenceId}}
|
||||
{{/referenceId}}
|
||||
|
||||
💳 **PIX কপি এবং পেস্ট পাঠানো হয়েছে**
|
||||
{{/pixData}}
|
||||
|
||||
whatsapp.to.chatwoot.message.unsupported: |-
|
||||
⚠️ **এই ধরনের বার্তা ChatWoot-এ সমর্থিত নয়।**
|
||||
📱 এটি দেখতে অনুগ্রহ করে **WhatsApp** খুলুন।
|
||||
|
||||
বিস্তারিত: [{{{details.text}}}]({{{details.url}}})
|
||||
|
||||
whatsapp.to.chatwoot.message.facebook.ad: |-
|
||||
📢 **ফেসবুক বিজ্ঞাপন**
|
||||
|
||||
**শিরোনাম:** {{{adData.title}}}
|
||||
|
||||
**বর্ণনা:**
|
||||
{{{adData.body}}}
|
||||
|
||||
**বিজ্ঞাপনের লিংক:** [ফেসবুকে দেখুন]({{{adData.sourceUrl}}})
|
||||
**বিজ্ঞাপনের আইডি:** {{{adData.sourceId}}}
|
||||
|
||||
---
|
||||
💬 **গ্রাহকের বার্তা:**
|
||||
{{{payload.body}}}
|
||||
@@ -1,9 +1,29 @@
|
||||
# German translations for ChatWoot integration
|
||||
locale.name: '🇩🇪 Deutsch (German)'
|
||||
app.inbox.contact.name: 'WhatsApp Integration (WAHA)'
|
||||
|
||||
# Basis-Gebietsschema-Code - muss eine gültige BCP 47 Locale sein
|
||||
# https://en.wikipedia.org/wiki/IETF_language_tag
|
||||
# WAHA nutzt ihn zur Darstellung von Zahlen, Währungen sowie Datum und Uhrzeit
|
||||
locale.base: 'de-DE'
|
||||
|
||||
app.inbox.contact.name: 'WhatsApp Integration'
|
||||
app.inbox.contact.avatar.url: 'https://raw.githubusercontent.com/devlikeapro/waha/core/logo.png'
|
||||
|
||||
job.report.error: |
|
||||
# "Optionen" von date.toLocaleString
|
||||
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options
|
||||
datetime:
|
||||
locales: de-DE
|
||||
day: 2-digit
|
||||
month: 2-digit
|
||||
year: numeric
|
||||
hour: 2-digit
|
||||
minute: 2-digit
|
||||
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#timezonename
|
||||
timeZoneName: shortGeneric
|
||||
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
# timeZone: 'Europe/Berlin'
|
||||
|
||||
job.report.error: |-
|
||||
⚠️ **{{{header}}}**
|
||||
{{#attempts.nextDelay}}
|
||||
🔄 Wiederholung in {{attempts.nextDelay}} Sekunden...
|
||||
@@ -20,7 +40,7 @@ job.report.error: |
|
||||
```
|
||||
{{/error}}
|
||||
|
||||
job.report.succeeded: |
|
||||
job.report.succeeded: |-
|
||||
✅ **Erfolgreich**
|
||||
Versuch: {{{attempts.current}}} / {{{attempts.max}}}
|
||||
Details: [{{{details.text}}}]({{{details.url}}})
|
||||
@@ -33,33 +53,33 @@ whatsapp.message.removing.error:
|
||||
Nachricht konnte nicht von WhatsApp entfernt werden
|
||||
job.scheduled.error.header: Geplante Aufgabe konnte nicht ausgeführt werden
|
||||
|
||||
message.from.whatsapp: |
|
||||
message.from.whatsapp: |-
|
||||
{{{text}}}
|
||||
|
||||
📱 *Von WhatsApp gesendet*
|
||||
|
||||
message.from.api: |
|
||||
message.from.api: |-
|
||||
{{{text}}}
|
||||
|
||||
📱 *Über API gesendet*
|
||||
|
||||
message.removed.in.whatsapp: |
|
||||
message.removed.in.whatsapp: |-
|
||||
❌ *Diese Nachricht wurde in WhatsApp gelöscht*
|
||||
|
||||
message.edited.in.whatsapp: |
|
||||
message.edited.in.whatsapp: |-
|
||||
{{{text}}}
|
||||
|
||||
✏️ *In WhatsApp bearbeitet*
|
||||
|
||||
whatsapp.group.message: |
|
||||
{{{text}}}
|
||||
|
||||
whatsapp.group.message: |-
|
||||
👥 *{{{participant}}}*
|
||||
|
||||
whatsapp.reaction.added: |
|
||||
{{{text}}}
|
||||
|
||||
whatsapp.reaction.added: |-
|
||||
*Reagiert mit* {{{emoji}}}
|
||||
|
||||
whatsapp.reaction.removed: |
|
||||
whatsapp.reaction.removed: |-
|
||||
*Reaktion entfernt*
|
||||
|
||||
whatsapp.contact.group.suffix: 'Gruppe'
|
||||
@@ -68,7 +88,7 @@ whatsapp.contact.broadcast.suffix: 'Broadcast-Liste'
|
||||
# Aka Stories
|
||||
whatsapp.contact.status.name: 'Status'
|
||||
|
||||
app.connected.message: |
|
||||
app.connected.message: |-
|
||||
🔗 **VERBUNDEN: WhatsApp-Sitzung mit ChatWoot Inbox**
|
||||
|
||||
✅ WhatsApp-Sitzung **{{{name}}}** wurde erfolgreich mit dieser ChatWoot Inbox verbunden.
|
||||
@@ -86,7 +106,7 @@ app.connected.message: |
|
||||
|
||||
Lassen Sie uns beginnen! 🚀
|
||||
|
||||
app.disconnected.message: |
|
||||
app.disconnected.message: |-
|
||||
🔌 **GETRENNT: WhatsApp-Sitzung von ChatWoot Inbox**
|
||||
|
||||
❌ WhatsApp-Sitzung **{{{name}}}** wurde von dieser ChatWoot Inbox getrennt.
|
||||
@@ -95,12 +115,12 @@ app.disconnected.message: |
|
||||
|
||||
Um eine erneute Verbindung herzustellen, wenden Sie sich bitte an Ihren Administrator.
|
||||
|
||||
app.updated.message: |
|
||||
app.updated.message: |-
|
||||
🔄 **AKTUALISIERT: WhatsApp-Sitzungseinstellungen**
|
||||
|
||||
✅ Einstellungen für WhatsApp-Sitzung **{{{name}}}** wurden aktualisiert.
|
||||
|
||||
app.commands.list: |
|
||||
app.commands.list: |-
|
||||
Sie können die **WhatsApp Integration** verwalten, indem Sie einen der folgenden Befehle senden:
|
||||
|
||||
🖥️ **Sitzung**:
|
||||
@@ -128,32 +148,32 @@ app.commands.server.disabled: ⛔ **Serverbefehle sind deaktiviert**.
|
||||
|
||||
Senden Sie **help**, um die Liste der verfügbaren Befehle zu erhalten.
|
||||
|
||||
app.help.reminder: |
|
||||
app.help.reminder: |-
|
||||
Senden Sie **help**, um die Liste der verfügbaren Befehle zu erhalten.
|
||||
|
||||
app.session.status.change: |
|
||||
app.session.status.change: |-
|
||||
{{{emoji}}} Sitzung "{{{session}}}" hat den Status zu {{{status}}} gewechselt
|
||||
|
||||
app.session.current.status: |
|
||||
app.session.current.status: |-
|
||||
{{{emoji}}} **{{{session}}}** Sitzungsstatus ist **{{{status}}}**
|
||||
**WhatsApp-Konto:**
|
||||
|
||||
📱 **{{{name}}} ({{{id}}})**
|
||||
|
||||
app.session.status.working: |
|
||||
app.session.status.working: |-
|
||||
✅ Diese ChatWoot Inbox ist mit dem **WhatsApp-Konto** verknüpft und bereit zum Senden und Empfangen von Nachrichten!
|
||||
|
||||
📱 **{{{name}}} ({{{id}}})**
|
||||
|
||||
app.session.status.error: |
|
||||
app.session.status.error: |-
|
||||
⚠️ **Diese ChatWoot Inbox ist mit dem WhatsApp-Konto verknüpft, aber NICHT bereit zum Senden und Empfangen von Nachrichten!**
|
||||
|
||||
Bitte überprüfen Sie den Sitzungsstatus und versuchen Sie, sie neu zu starten oder melden Sie sich ab und scannen Sie den QR-Code erneut.
|
||||
|
||||
app.session.scan.qr.code: |
|
||||
app.session.scan.qr.code: |-
|
||||
⚠️ **Scannen Sie den QR-Code auf Ihrem Telefon, um das WhatsApp-Konto mit dieser ChatWoot Inbox zu verknüpfen!**
|
||||
|
||||
app.server.version.and.status: |
|
||||
app.server.version.and.status: |-
|
||||
**Version:**
|
||||
```
|
||||
{{{version}}}
|
||||
@@ -164,16 +184,16 @@ app.server.version.and.status: |
|
||||
{{{status}}}
|
||||
```
|
||||
|
||||
app.server.reboot: |
|
||||
app.server.reboot: |-
|
||||
Server wird ordnungsgemäß neu gestartet...
|
||||
|
||||
app.server.reboot.force: |
|
||||
app.server.reboot.force: |-
|
||||
Server wird erzwungen neu gestartet...
|
||||
|
||||
app.logout.success: |
|
||||
app.logout.success: |-
|
||||
✅ Konto erfolgreich abgemeldet!
|
||||
|
||||
waha.new.version.available: |
|
||||
waha.new.version.available: |-
|
||||
🔄 **Neue Version verfügbar!**
|
||||
|
||||
Aktuelle Version: **{{{currentVersion}}}**
|
||||
@@ -181,7 +201,7 @@ waha.new.version.available: |
|
||||
|
||||
👉 Sehen Sie, was neu ist im [**🆕 Änderungsprotokoll**]({{{changelogUrl}}})
|
||||
|
||||
waha.core.version.used: |
|
||||
waha.core.version.used: |-
|
||||
❤️ **Unterstützen Sie WAHA!**
|
||||
|
||||
Sie verwenden die kostenlose **WAHA Core** Version. Wenn Sie dieses Projekt nützlich finden, erwägen Sie bitte, seine Entwicklung zu unterstützen.
|
||||
@@ -190,20 +210,20 @@ waha.core.version.used: |
|
||||
|
||||
[**🎁 Unterstützen Sie uns**]({{{supportUrl}}})
|
||||
|
||||
chatwoot.to.whatsapp.message.text: |
|
||||
chatwoot.to.whatsapp.message.text: |-
|
||||
{{{ content }}}
|
||||
|
||||
chatwoot.to.whatsapp.message.media.caption: |
|
||||
chatwoot.to.whatsapp.message.media.caption: |-
|
||||
{{#singleAttachment}}
|
||||
{{#content}}
|
||||
{{{ content }}}
|
||||
{{/content}}
|
||||
{{/singleAttachment}}
|
||||
|
||||
whatsapp.to.chatwoot.message: |
|
||||
whatsapp.to.chatwoot.message: |-
|
||||
{{{payload.body}}}
|
||||
|
||||
whatsapp.to.chatwoot.message.contacts: |
|
||||
whatsapp.to.chatwoot.message.contacts: |-
|
||||
👤 **Geteilte Kontakte**
|
||||
|
||||
{{#contacts}}
|
||||
@@ -214,12 +234,24 @@ whatsapp.to.chatwoot.message.contacts: |
|
||||
|
||||
{{/contacts}}
|
||||
|
||||
whatsapp.to.chatwoot.message.location: |
|
||||
whatsapp.to.chatwoot.message.location: |-
|
||||
{{#message}}
|
||||
{{#locationMessage}}
|
||||
📍 **Geteilter Standort**
|
||||
|
||||
https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#name}}
|
||||
**{{name}}**
|
||||
{{/name}}
|
||||
|
||||
{{#address}}
|
||||
📍 **Adresse:** {{address}}
|
||||
{{/address}}
|
||||
|
||||
{{#url}}
|
||||
🌐 **Webseite:** {{url}}
|
||||
{{/url}}
|
||||
|
||||
🔗 **Auf Karte ansehen:** https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#caption}}{{caption}}{{/caption}}
|
||||
{{/locationMessage}}
|
||||
|
||||
@@ -227,13 +259,127 @@ whatsapp.to.chatwoot.message.location: |
|
||||
📍📡 **Live-Standort wird geteilt**
|
||||
Öffne **WhatsApp**, um Aktualisierungen in Echtzeit zu sehen.
|
||||
|
||||
https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#name}}
|
||||
**{{name}}**
|
||||
{{/name}}
|
||||
|
||||
{{#address}}
|
||||
📍 **Adresse:** {{address}}
|
||||
{{/address}}
|
||||
|
||||
{{#url}}
|
||||
🌐 **Webseite:** {{url}}
|
||||
{{/url}}
|
||||
|
||||
🔗 **Auf Karte ansehen:** https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#caption}}{{caption}}{{/caption}}
|
||||
{{/liveLocationMessage}}
|
||||
{{/message}}
|
||||
|
||||
whatsapp.to.chatwoot.message.unsupported: |
|
||||
whatsapp.to.chatwoot.message.poll: |-
|
||||
{{#poll}}
|
||||
📊 **Umfrage**
|
||||
|
||||
**{{name}}**
|
||||
{{#options}}
|
||||
- {{optionName}}
|
||||
{{/options}}
|
||||
{{/poll}}
|
||||
|
||||
whatsapp.to.chatwoot.message.list: |-
|
||||
{{#message.listMessage}}
|
||||
{{#title}}
|
||||
*{{{title}}}*
|
||||
{{/title}}
|
||||
{{#description}}
|
||||
{{{description}}}
|
||||
{{/description}}
|
||||
{{#footerText}}
|
||||
{{{footerText}}}
|
||||
{{/footerText}}
|
||||
|
||||
{{#buttonText}}
|
||||
{{{buttonText}}}
|
||||
{{/buttonText}}
|
||||
{{#sections}}
|
||||
{{#title}}
|
||||
{{{title}}}:
|
||||
{{/title}}
|
||||
{{#rows}}
|
||||
{{#title}}
|
||||
- {{{title}}}
|
||||
{{/title}}
|
||||
{{/rows}}
|
||||
|
||||
{{/sections}}
|
||||
{{/message.listMessage}}
|
||||
|
||||
whatsapp.to.chatwoot.message.event: |-
|
||||
{{#message}}
|
||||
{{#eventMessage}}
|
||||
📅 **Veranstaltung**
|
||||
|
||||
**{{name}}**
|
||||
{{#description}}
|
||||
{{description}}
|
||||
{{/description}}
|
||||
|
||||
{{#location.name}}
|
||||
📍 **Ort:** {{location.name}}
|
||||
{{/location.name}}
|
||||
{{#startTime}}
|
||||
🕐 **Beginn:** {{startTime}}
|
||||
{{/startTime}}
|
||||
{{#endTime}}
|
||||
🕐 **Ende:** {{endTime}}
|
||||
{{/endTime}}
|
||||
{{#joinLink}}
|
||||
🔗 **Teilnahmelink:** [{{joinLink}}]({{joinLink}})
|
||||
{{/joinLink}}
|
||||
{{/eventMessage}}
|
||||
{{/message}}
|
||||
|
||||
whatsapp.to.chatwoot.message.pix: |-
|
||||
💳 **PIX - Kopieren und Einfügen**
|
||||
|
||||
{{#pixData}}
|
||||
{{#merchantName}}
|
||||
**{{merchantName}}**
|
||||
{{/merchantName}}
|
||||
|
||||
{{#key}}
|
||||
**PIX-Schlüssel:** {{key}}
|
||||
{{/key}}
|
||||
{{#keyType}}
|
||||
**Typ:** {{keyType}}
|
||||
{{/keyType}}
|
||||
{{#totalAmount}}
|
||||
**Betrag:** {{totalAmountFormatted}}
|
||||
{{/totalAmount}}
|
||||
{{#referenceId}}
|
||||
**Referenz:** {{referenceId}}
|
||||
{{/referenceId}}
|
||||
|
||||
💳 **PIX Kopieren und Einfügen gesendet**
|
||||
{{/pixData}}
|
||||
|
||||
whatsapp.to.chatwoot.message.unsupported: |-
|
||||
⚠️ **Dieser Nachrichtentyp wird in ChatWoot nicht unterstützt.**
|
||||
📱 Bitte öffne **WhatsApp**, um ihn anzusehen.
|
||||
|
||||
Details: [{{{details.text}}}]({{{details.url}}})
|
||||
|
||||
whatsapp.to.chatwoot.message.facebook.ad: |-
|
||||
📢 **FACEBOOK-ANZEIGE**
|
||||
|
||||
**Titel:** {{{adData.title}}}
|
||||
|
||||
**Beschreibung:**
|
||||
{{{adData.body}}}
|
||||
|
||||
**Anzeigenlink:** [Auf Facebook ansehen]({{{adData.sourceUrl}}})
|
||||
**Anzeigen-ID:** {{{adData.sourceId}}}
|
||||
|
||||
---
|
||||
💬 **Kundennachricht:**
|
||||
{{{payload.body}}}
|
||||
@@ -1,10 +1,28 @@
|
||||
# English translations for ChatWoot integration
|
||||
locale.name: '🇺🇸 English (English)'
|
||||
|
||||
app.inbox.contact.name: 'WhatsApp Integration (WAHA)'
|
||||
# Base locale code - must be a valid BCP 47 locale
|
||||
# https://en.wikipedia.org/wiki/IETF_language_tag
|
||||
# WAHA uses it for number, currency and datetime representation
|
||||
locale.base: 'en-US'
|
||||
|
||||
app.inbox.contact.name: 'WhatsApp Integration'
|
||||
app.inbox.contact.avatar.url: 'https://raw.githubusercontent.com/devlikeapro/waha/core/logo.png'
|
||||
|
||||
job.report.error: |
|
||||
# "options" from date.toLocaleString
|
||||
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options
|
||||
datetime:
|
||||
day: 2-digit
|
||||
month: 2-digit
|
||||
year: numeric
|
||||
hour: 2-digit
|
||||
minute: 2-digit
|
||||
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#timezonename
|
||||
timeZoneName: shortGeneric
|
||||
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
# timeZone: 'America/New_York'
|
||||
|
||||
job.report.error: |-
|
||||
⚠️ **{{{header}}}**
|
||||
{{#attempts.nextDelay}}
|
||||
🔄 Retrying in {{attempts.nextDelay}} seconds...
|
||||
@@ -21,7 +39,7 @@ job.report.error: |
|
||||
```
|
||||
{{/error}}
|
||||
|
||||
job.report.succeeded: |
|
||||
job.report.succeeded: |-
|
||||
✅ **Succeeded**
|
||||
Attempt: {{{attempts.current}}} / {{{attempts.max}}}
|
||||
Details: [{{{details.text}}}]({{{details.url}}})
|
||||
@@ -31,33 +49,33 @@ whatsapp.message.receiving.error: Couldn't receive a message from WhatsApp
|
||||
whatsapp.message.removing.error: Couldn't remove a message from WhatsApp
|
||||
job.scheduled.error.header: Scheduled job failed to execute
|
||||
|
||||
message.from.whatsapp: |
|
||||
message.from.whatsapp: |-
|
||||
{{{text}}}
|
||||
|
||||
📱 *Sent from WhatsApp*
|
||||
|
||||
message.from.api: |
|
||||
message.from.api: |-
|
||||
{{{text}}}
|
||||
|
||||
📱 *Sent via API*
|
||||
|
||||
message.removed.in.whatsapp: |
|
||||
message.removed.in.whatsapp: |-
|
||||
❌ *This message was deleted in WhatsApp*
|
||||
|
||||
message.edited.in.whatsapp: |
|
||||
message.edited.in.whatsapp: |-
|
||||
{{{text}}}
|
||||
|
||||
✏️ *Edited in WhatsApp*
|
||||
|
||||
whatsapp.group.message: |
|
||||
{{{text}}}
|
||||
|
||||
whatsapp.group.message: |-
|
||||
👥 *{{{participant}}}*
|
||||
|
||||
whatsapp.reaction.added: |
|
||||
{{{text}}}
|
||||
|
||||
whatsapp.reaction.added: |-
|
||||
*Reacted* {{{emoji}}}
|
||||
|
||||
whatsapp.reaction.removed: |
|
||||
whatsapp.reaction.removed: |-
|
||||
*Reaction removed*
|
||||
|
||||
whatsapp.contact.group.suffix: 'Group'
|
||||
@@ -66,20 +84,20 @@ whatsapp.contact.broadcast.suffix: 'Broadcast List'
|
||||
# Aka Stories
|
||||
whatsapp.contact.status.name: 'Status'
|
||||
|
||||
chatwoot.to.whatsapp.message.text: |
|
||||
chatwoot.to.whatsapp.message.text: |-
|
||||
{{{ content }}}
|
||||
|
||||
chatwoot.to.whatsapp.message.media.caption: |
|
||||
chatwoot.to.whatsapp.message.media.caption: |-
|
||||
{{#singleAttachment}}
|
||||
{{#content}}
|
||||
{{{ content }}}
|
||||
{{/content}}
|
||||
{{/singleAttachment}}
|
||||
|
||||
whatsapp.to.chatwoot.message: |
|
||||
whatsapp.to.chatwoot.message: |-
|
||||
{{{payload.body}}}
|
||||
|
||||
whatsapp.to.chatwoot.message.contacts: |
|
||||
whatsapp.to.chatwoot.message.contacts: |-
|
||||
👤 **Shared Contact(s)**
|
||||
|
||||
{{#contacts}}
|
||||
@@ -90,12 +108,24 @@ whatsapp.to.chatwoot.message.contacts: |
|
||||
|
||||
{{/contacts}}
|
||||
|
||||
whatsapp.to.chatwoot.message.location: |
|
||||
whatsapp.to.chatwoot.message.location: |-
|
||||
{{#message}}
|
||||
{{#locationMessage}}
|
||||
📍 **Shared Location**
|
||||
|
||||
https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#name}}
|
||||
**{{name}}**
|
||||
{{/name}}
|
||||
|
||||
{{#address}}
|
||||
📍 **Address:** {{address}}
|
||||
{{/address}}
|
||||
|
||||
{{#url}}
|
||||
🌐 **Website:** {{url}}
|
||||
{{/url}}
|
||||
|
||||
🔗 **View on map:** https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#caption}}{{caption}}{{/caption}}
|
||||
{{/locationMessage}}
|
||||
|
||||
@@ -103,18 +133,132 @@ whatsapp.to.chatwoot.message.location: |
|
||||
📍📡 **Sharing Live Location**
|
||||
Open **WhatsApp** to see real-time updates.
|
||||
|
||||
https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#name}}
|
||||
**{{name}}**
|
||||
{{/name}}
|
||||
|
||||
{{#address}}
|
||||
📍 **Address:** {{address}}
|
||||
{{/address}}
|
||||
|
||||
{{#url}}
|
||||
🌐 **Website:** {{url}}
|
||||
{{/url}}
|
||||
|
||||
🔗 **View on map:** https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#caption}}{{caption}}{{/caption}}
|
||||
{{/liveLocationMessage}}
|
||||
{{/message}}
|
||||
|
||||
whatsapp.to.chatwoot.message.unsupported: |
|
||||
whatsapp.to.chatwoot.message.poll: |-
|
||||
{{#poll}}
|
||||
📊 **Poll**
|
||||
|
||||
**{{name}}**
|
||||
{{#options}}
|
||||
- {{optionName}}
|
||||
{{/options}}
|
||||
{{/poll}}
|
||||
|
||||
whatsapp.to.chatwoot.message.list: |-
|
||||
{{#message.listMessage}}
|
||||
{{#title}}
|
||||
*{{{title}}}*
|
||||
{{/title}}
|
||||
{{#description}}
|
||||
{{{description}}}
|
||||
{{/description}}
|
||||
{{#footerText}}
|
||||
{{{footerText}}}
|
||||
{{/footerText}}
|
||||
|
||||
{{#buttonText}}
|
||||
{{{buttonText}}}
|
||||
{{/buttonText}}
|
||||
{{#sections}}
|
||||
{{#title}}
|
||||
{{{title}}}:
|
||||
{{/title}}
|
||||
{{#rows}}
|
||||
{{#title}}
|
||||
- {{{title}}}
|
||||
{{/title}}
|
||||
{{/rows}}
|
||||
|
||||
{{/sections}}
|
||||
{{/message.listMessage}}
|
||||
|
||||
whatsapp.to.chatwoot.message.event: |-
|
||||
{{#message}}
|
||||
{{#eventMessage}}
|
||||
📅 **Event**
|
||||
|
||||
**{{name}}**
|
||||
{{#description}}
|
||||
{{description}}
|
||||
{{/description}}
|
||||
|
||||
{{#location.name}}
|
||||
📍 **Location:** {{location.name}}
|
||||
{{/location.name}}
|
||||
{{#startTime}}
|
||||
🕐 **Start:** {{startTime}}
|
||||
{{/startTime}}
|
||||
{{#endTime}}
|
||||
🕐 **End:** {{endTime}}
|
||||
{{/endTime}}
|
||||
{{#joinLink}}
|
||||
🔗 **Join Link:** [{{joinLink}}]({{joinLink}})
|
||||
{{/joinLink}}
|
||||
{{/eventMessage}}
|
||||
{{/message}}
|
||||
|
||||
whatsapp.to.chatwoot.message.pix: |-
|
||||
💳 **PIX - Copy and Paste**
|
||||
|
||||
{{#pixData}}
|
||||
{{#merchantName}}
|
||||
**{{merchantName}}**
|
||||
{{/merchantName}}
|
||||
|
||||
{{#key}}
|
||||
**PIX Key:** {{key}}
|
||||
{{/key}}
|
||||
{{#keyType}}
|
||||
**Type:** {{keyType}}
|
||||
{{/keyType}}
|
||||
{{#totalAmount}}
|
||||
**Amount:** {{totalAmountFormatted}}
|
||||
{{/totalAmount}}
|
||||
{{#referenceId}}
|
||||
**Reference:** {{referenceId}}
|
||||
{{/referenceId}}
|
||||
|
||||
💳 **PIX Copy and Paste sent**
|
||||
{{/pixData}}
|
||||
|
||||
whatsapp.to.chatwoot.message.unsupported: |-
|
||||
⚠️ **This message type is not supported in ChatWoot.**
|
||||
📱 Please open **WhatsApp** to view it.
|
||||
|
||||
Details: [{{{details.text}}}]({{{details.url}}})
|
||||
|
||||
app.connected.message: |
|
||||
whatsapp.to.chatwoot.message.facebook.ad: |-
|
||||
📢 **FACEBOOK AD**
|
||||
|
||||
**Title:** {{{adData.title}}}
|
||||
|
||||
**Description:**
|
||||
{{{adData.body}}}
|
||||
|
||||
**Ad Link:** [View on Facebook]({{{adData.sourceUrl}}})
|
||||
**Ad ID:** {{{adData.sourceId}}}
|
||||
|
||||
---
|
||||
💬 **CUSTOMER MESSAGE:**
|
||||
{{{payload.body}}}
|
||||
|
||||
app.connected.message: |-
|
||||
🔗 **CONNECTED: WhatsApp Session to ChatWoot Inbox**
|
||||
|
||||
✅ WhatsApp session **{{{name}}}** has been successfully connected to this ChatWoot Inbox.
|
||||
@@ -132,7 +276,7 @@ app.connected.message: |
|
||||
|
||||
Let's get started! 🚀
|
||||
|
||||
app.disconnected.message: |
|
||||
app.disconnected.message: |-
|
||||
🔌 **DISCONNECTED: WhatsApp Session from ChatWoot Inbox**
|
||||
|
||||
❌ WhatsApp session **{{{name}}}** has been disconnected from this ChatWoot Inbox.
|
||||
@@ -141,12 +285,12 @@ app.disconnected.message: |
|
||||
|
||||
To reconnect, please contact your administrator.
|
||||
|
||||
app.updated.message: |
|
||||
app.updated.message: |-
|
||||
🔄 **UPDATED: WhatsApp Session Settings**
|
||||
|
||||
✅ Settings for WhatsApp session **{{{name}}}** have been updated.
|
||||
|
||||
app.commands.list: |
|
||||
app.commands.list: |-
|
||||
You can manage **WhatsApp Integration** by sending one of the following commands:
|
||||
|
||||
🖥️ **Session**:
|
||||
@@ -174,32 +318,32 @@ app.commands.server.disabled: ⛔ **Server commands are disabled**.
|
||||
|
||||
Send **help** to get the list of available commands.
|
||||
|
||||
app.help.reminder: |
|
||||
app.help.reminder: |-
|
||||
Send **help** to get the list of available commands.
|
||||
|
||||
app.session.status.change: |
|
||||
app.session.status.change: |-
|
||||
{{{emoji}}} "{{{session}}}" session switched to {{{status}}} status
|
||||
|
||||
app.session.current.status: |
|
||||
app.session.current.status: |-
|
||||
{{{emoji}}} **{{{session}}}** session status is in **{{{status}}}**
|
||||
**WhatsApp Account:**
|
||||
|
||||
📱 **{{{name}}} ({{{id}}})**
|
||||
|
||||
app.session.status.working: |
|
||||
app.session.status.working: |-
|
||||
✅ This ChatWoot Inbox is linked to **WhatsApp Account** and ready to send and receive messages!
|
||||
|
||||
📱 **{{{name}}} ({{{id}}})**
|
||||
|
||||
app.session.status.error: |
|
||||
app.session.status.error: |-
|
||||
⚠️ **This ChatWoot Inbox is linked to WhatsApp Account but NOT ready to send and receive messages!**
|
||||
|
||||
Please check the session status and try restarting it or logout and scan the QR code again.
|
||||
|
||||
app.session.scan.qr.code: |
|
||||
app.session.scan.qr.code: |-
|
||||
⚠️ **Scan the QR code on your phone to link WhatsApp Account with this ChatWoot Inbox!**
|
||||
|
||||
app.server.version.and.status: |
|
||||
app.server.version.and.status: |-
|
||||
**Version:**
|
||||
```
|
||||
{{{version}}}
|
||||
@@ -210,16 +354,16 @@ app.server.version.and.status: |
|
||||
{{{status}}}
|
||||
```
|
||||
|
||||
app.server.reboot: |
|
||||
app.server.reboot: |-
|
||||
Server is rebooting gracefully...
|
||||
|
||||
app.server.reboot.force: |
|
||||
app.server.reboot.force: |-
|
||||
Server is force rebooting...
|
||||
|
||||
app.logout.success: |
|
||||
app.logout.success: |-
|
||||
✅ Account unauthorized successfully!
|
||||
|
||||
waha.new.version.available: |
|
||||
waha.new.version.available: |-
|
||||
🔄 **New Version Available!**
|
||||
|
||||
Current version: **{{{currentVersion}}}**
|
||||
@@ -227,7 +371,7 @@ waha.new.version.available: |
|
||||
|
||||
👉 Check out what's new in the [**🆕 Changelog**]({{{changelogUrl}}})
|
||||
|
||||
waha.core.version.used: |
|
||||
waha.core.version.used: |-
|
||||
❤️ **Support WAHA!**
|
||||
|
||||
You're using the free **WAHA Core** version. If you find this project useful, please consider supporting its development.
|
||||
|
||||
@@ -1,9 +1,29 @@
|
||||
# Spanish translations for ChatWoot integration
|
||||
locale.name: '🇪🇸 Español (Spanish)'
|
||||
app.inbox.contact.name: 'Integración de WhatsApp (WAHA)'
|
||||
|
||||
# Código de locale base - debe ser un locale BCP 47 válido
|
||||
# https://en.wikipedia.org/wiki/IETF_language_tag
|
||||
# WAHA lo utiliza para formatear números, moneda y fecha/hora
|
||||
locale.base: 'es-ES'
|
||||
|
||||
app.inbox.contact.name: 'Integración de WhatsApp'
|
||||
app.inbox.contact.avatar.url: 'https://raw.githubusercontent.com/devlikeapro/waha/core/logo.png'
|
||||
|
||||
job.report.error: |
|
||||
# "opciones" de date.toLocaleString
|
||||
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options
|
||||
datetime:
|
||||
locales: es-ES
|
||||
day: 2-digit
|
||||
month: 2-digit
|
||||
year: numeric
|
||||
hour: 2-digit
|
||||
minute: 2-digit
|
||||
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#timezonename
|
||||
timeZoneName: shortGeneric
|
||||
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
# timeZone: 'Europe/Madrid'
|
||||
|
||||
job.report.error: |-
|
||||
⚠️ **{{{header}}}**
|
||||
{{#attempts.nextDelay}}
|
||||
🔄 Reintentando en {{attempts.nextDelay}} segundos...
|
||||
@@ -20,7 +40,7 @@ job.report.error: |
|
||||
```
|
||||
{{/error}}
|
||||
|
||||
job.report.succeeded: |
|
||||
job.report.succeeded: |-
|
||||
✅ **Éxito**
|
||||
Intento: {{{attempts.current}}} / {{{attempts.max}}}
|
||||
Detalles: [{{{details.text}}}]({{{details.url}}})
|
||||
@@ -30,33 +50,33 @@ whatsapp.message.receiving.error: No se pudo recibir un mensaje de WhatsApp
|
||||
whatsapp.message.removing.error: No se pudo eliminar un mensaje de WhatsApp
|
||||
job.scheduled.error.header: La tarea programada no se pudo ejecutar
|
||||
|
||||
message.from.whatsapp: |
|
||||
message.from.whatsapp: |-
|
||||
{{{text}}}
|
||||
|
||||
📱 *Enviado desde WhatsApp*
|
||||
|
||||
message.from.api: |
|
||||
message.from.api: |-
|
||||
{{{text}}}
|
||||
|
||||
📱 *Enviado a través de API*
|
||||
|
||||
message.removed.in.whatsapp: |
|
||||
message.removed.in.whatsapp: |-
|
||||
❌ *Este mensaje fue eliminado en WhatsApp*
|
||||
|
||||
message.edited.in.whatsapp: |
|
||||
message.edited.in.whatsapp: |-
|
||||
{{{text}}}
|
||||
|
||||
✏️ *Editado en WhatsApp*
|
||||
|
||||
whatsapp.group.message: |
|
||||
{{{text}}}
|
||||
|
||||
whatsapp.group.message: |-
|
||||
👥 *{{{participant}}}*
|
||||
|
||||
whatsapp.reaction.added: |
|
||||
{{{text}}}
|
||||
|
||||
whatsapp.reaction.added: |-
|
||||
*Reaccionó con* {{{emoji}}}
|
||||
|
||||
whatsapp.reaction.removed: |
|
||||
whatsapp.reaction.removed: |-
|
||||
*Reacción eliminada*
|
||||
|
||||
whatsapp.contact.group.suffix: 'Grupo'
|
||||
@@ -65,7 +85,7 @@ whatsapp.contact.broadcast.suffix: 'Lista de difusión'
|
||||
# Aka Stories
|
||||
whatsapp.contact.status.name: 'Estado'
|
||||
|
||||
app.connected.message: |
|
||||
app.connected.message: |-
|
||||
🔗 **CONECTADO: Sesión de WhatsApp a Bandeja de Entrada de ChatWoot**
|
||||
|
||||
✅ La sesión de WhatsApp **{{{name}}}** ha sido conectada exitosamente a esta Bandeja de Entrada de ChatWoot.
|
||||
@@ -83,7 +103,7 @@ app.connected.message: |
|
||||
|
||||
¡Comencemos! 🚀
|
||||
|
||||
app.disconnected.message: |
|
||||
app.disconnected.message: |-
|
||||
🔌 **DESCONECTADO: Sesión de WhatsApp de Bandeja de Entrada de ChatWoot**
|
||||
|
||||
❌ La sesión de WhatsApp **{{{name}}}** ha sido desconectada de esta Bandeja de Entrada de ChatWoot.
|
||||
@@ -92,12 +112,12 @@ app.disconnected.message: |
|
||||
|
||||
Para reconectar, por favor contacta a tu administrador.
|
||||
|
||||
app.updated.message: |
|
||||
app.updated.message: |-
|
||||
🔄 **ACTUALIZADO: Configuración de Sesión de WhatsApp**
|
||||
|
||||
✅ La configuración para la sesión de WhatsApp **{{{name}}}** ha sido actualizada.
|
||||
|
||||
app.commands.list: |
|
||||
app.commands.list: |-
|
||||
Puedes gestionar la **Integración de WhatsApp** enviando uno de los siguientes comandos:
|
||||
|
||||
🖥️ **Sesión**:
|
||||
@@ -128,32 +148,32 @@ app.commands.server.disabled: ⛔ **Los comandos del servidor están
|
||||
|
||||
Envía **help** para obtener la lista de comandos disponibles.
|
||||
|
||||
app.help.reminder: |
|
||||
app.help.reminder: |-
|
||||
Envía **help** para obtener la lista de comandos disponibles.
|
||||
|
||||
app.session.status.change: |
|
||||
app.session.status.change: |-
|
||||
{{{emoji}}} La sesión "{{{session}}}" cambió al estado {{{status}}}
|
||||
|
||||
app.session.current.status: |
|
||||
app.session.current.status: |-
|
||||
{{{emoji}}} El estado de la sesión **{{{session}}}** es **{{{status}}}**
|
||||
**Cuenta de WhatsApp:**
|
||||
|
||||
📱 **{{{name}}} ({{{id}}})**
|
||||
|
||||
app.session.status.working: |
|
||||
app.session.status.working: |-
|
||||
✅ ¡Esta Bandeja de Entrada de ChatWoot está vinculada a la **Cuenta de WhatsApp** y lista para enviar y recibir mensajes!
|
||||
|
||||
📱 **{{{name}}} ({{{id}}})**
|
||||
|
||||
app.session.status.error: |
|
||||
app.session.status.error: |-
|
||||
⚠️ **¡Esta Bandeja de Entrada de ChatWoot está vinculada a la Cuenta de WhatsApp pero NO está lista para enviar y recibir mensajes!**
|
||||
|
||||
Por favor, comprueba el estado de la sesión e intenta reiniciarla o cierra sesión y escanea el código QR de nuevo.
|
||||
|
||||
app.session.scan.qr.code: |
|
||||
app.session.scan.qr.code: |-
|
||||
⚠️ **¡Escanea el código QR en tu teléfono para vincular la Cuenta de WhatsApp con esta Bandeja de Entrada de ChatWoot!**
|
||||
|
||||
app.server.version.and.status: |
|
||||
app.server.version.and.status: |-
|
||||
**Versión:**
|
||||
```
|
||||
{{{version}}}
|
||||
@@ -164,16 +184,16 @@ app.server.version.and.status: |
|
||||
{{{status}}}
|
||||
```
|
||||
|
||||
app.server.reboot: |
|
||||
app.server.reboot: |-
|
||||
El servidor se está reiniciando de forma segura...
|
||||
|
||||
app.server.reboot.force: |
|
||||
app.server.reboot.force: |-
|
||||
El servidor se está reiniciando forzadamente...
|
||||
|
||||
app.logout.success: |
|
||||
app.logout.success: |-
|
||||
✅ ¡Cuenta desautorizada con éxito!
|
||||
|
||||
waha.new.version.available: |
|
||||
waha.new.version.available: |-
|
||||
🔄 **¡Nueva Versión Disponible!**
|
||||
|
||||
Versión actual: **{{{currentVersion}}}**
|
||||
@@ -181,7 +201,7 @@ waha.new.version.available: |
|
||||
|
||||
👉 Mira qué hay de nuevo en el [**🆕 Registro de Cambios**]({{{changelogUrl}}})
|
||||
|
||||
waha.core.version.used: |
|
||||
waha.core.version.used: |-
|
||||
❤️ **¡Apoya a WAHA!**
|
||||
|
||||
Estás usando la versión gratuita **WAHA Core**. Si encuentras útil este proyecto, por favor considera apoyar su desarrollo.
|
||||
@@ -190,20 +210,20 @@ waha.core.version.used: |
|
||||
|
||||
[**🎁 Apóyanos**]({{{supportUrl}}})
|
||||
|
||||
chatwoot.to.whatsapp.message.text: |
|
||||
chatwoot.to.whatsapp.message.text: |-
|
||||
{{{ content }}}
|
||||
|
||||
chatwoot.to.whatsapp.message.media.caption: |
|
||||
chatwoot.to.whatsapp.message.media.caption: |-
|
||||
{{#singleAttachment}}
|
||||
{{#content}}
|
||||
{{{ content }}}
|
||||
{{/content}}
|
||||
{{/singleAttachment}}
|
||||
|
||||
whatsapp.to.chatwoot.message: |
|
||||
whatsapp.to.chatwoot.message: |-
|
||||
{{{payload.body}}}
|
||||
|
||||
whatsapp.to.chatwoot.message.contacts: |
|
||||
whatsapp.to.chatwoot.message.contacts: |-
|
||||
👤 **Contacto(s) compartido(s)**
|
||||
|
||||
{{#contacts}}
|
||||
@@ -214,12 +234,24 @@ whatsapp.to.chatwoot.message.contacts: |
|
||||
|
||||
{{/contacts}}
|
||||
|
||||
whatsapp.to.chatwoot.message.location: |
|
||||
whatsapp.to.chatwoot.message.location: |-
|
||||
{{#message}}
|
||||
{{#locationMessage}}
|
||||
📍 **Ubicación compartida**
|
||||
|
||||
https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#name}}
|
||||
**{{name}}**
|
||||
{{/name}}
|
||||
|
||||
{{#address}}
|
||||
📍 **Dirección:** {{address}}
|
||||
{{/address}}
|
||||
|
||||
{{#url}}
|
||||
🌐 **Sitio web:** {{url}}
|
||||
{{/url}}
|
||||
|
||||
🔗 **Ver en el mapa:** https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#caption}}{{caption}}{{/caption}}
|
||||
{{/locationMessage}}
|
||||
|
||||
@@ -227,13 +259,127 @@ whatsapp.to.chatwoot.message.location: |
|
||||
📍📡 **Compartiendo ubicación en tiempo real**
|
||||
Abre **WhatsApp** para ver las actualizaciones en tiempo real.
|
||||
|
||||
https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#name}}
|
||||
**{{name}}**
|
||||
{{/name}}
|
||||
|
||||
{{#address}}
|
||||
📍 **Dirección:** {{address}}
|
||||
{{/address}}
|
||||
|
||||
{{#url}}
|
||||
🌐 **Sitio web:** {{url}}
|
||||
{{/url}}
|
||||
|
||||
🔗 **Ver en el mapa:** https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#caption}}{{caption}}{{/caption}}
|
||||
{{/liveLocationMessage}}
|
||||
{{/message}}
|
||||
|
||||
whatsapp.to.chatwoot.message.unsupported: |
|
||||
whatsapp.to.chatwoot.message.poll: |-
|
||||
{{#poll}}
|
||||
📊 **Encuesta**
|
||||
|
||||
**{{name}}**
|
||||
{{#options}}
|
||||
- {{optionName}}
|
||||
{{/options}}
|
||||
{{/poll}}
|
||||
|
||||
whatsapp.to.chatwoot.message.list: |-
|
||||
{{#message.listMessage}}
|
||||
{{#title}}
|
||||
*{{{title}}}*
|
||||
{{/title}}
|
||||
{{#description}}
|
||||
{{{description}}}
|
||||
{{/description}}
|
||||
{{#footerText}}
|
||||
{{{footerText}}}
|
||||
{{/footerText}}
|
||||
|
||||
{{#buttonText}}
|
||||
{{{buttonText}}}
|
||||
{{/buttonText}}
|
||||
{{#sections}}
|
||||
{{#title}}
|
||||
{{{title}}}:
|
||||
{{/title}}
|
||||
{{#rows}}
|
||||
{{#title}}
|
||||
- {{{title}}}
|
||||
{{/title}}
|
||||
{{/rows}}
|
||||
|
||||
{{/sections}}
|
||||
{{/message.listMessage}}
|
||||
|
||||
whatsapp.to.chatwoot.message.event: |-
|
||||
{{#message}}
|
||||
{{#eventMessage}}
|
||||
📅 **Evento**
|
||||
|
||||
**{{name}}**
|
||||
{{#description}}
|
||||
{{description}}
|
||||
{{/description}}
|
||||
|
||||
{{#location.name}}
|
||||
📍 **Ubicación:** {{location.name}}
|
||||
{{/location.name}}
|
||||
{{#startTime}}
|
||||
🕐 **Inicio:** {{startTime}}
|
||||
{{/startTime}}
|
||||
{{#endTime}}
|
||||
🕐 **Fin:** {{endTime}}
|
||||
{{/endTime}}
|
||||
{{#joinLink}}
|
||||
🔗 **Enlace para unirse:** [{{joinLink}}]({{joinLink}})
|
||||
{{/joinLink}}
|
||||
{{/eventMessage}}
|
||||
{{/message}}
|
||||
|
||||
whatsapp.to.chatwoot.message.pix: |-
|
||||
💳 **PIX - Copiar y Pegar**
|
||||
|
||||
{{#pixData}}
|
||||
{{#merchantName}}
|
||||
**{{merchantName}}**
|
||||
{{/merchantName}}
|
||||
|
||||
{{#key}}
|
||||
**Clave PIX:** {{key}}
|
||||
{{/key}}
|
||||
{{#keyType}}
|
||||
**Tipo:** {{keyType}}
|
||||
{{/keyType}}
|
||||
{{#totalAmount}}
|
||||
**Importe:** {{totalAmountFormatted}}
|
||||
{{/totalAmount}}
|
||||
{{#referenceId}}
|
||||
**Referencia:** {{referenceId}}
|
||||
{{/referenceId}}
|
||||
|
||||
💳 **PIX Copiar y Pegar enviado**
|
||||
{{/pixData}}
|
||||
|
||||
whatsapp.to.chatwoot.message.unsupported: |-
|
||||
⚠️ **Este tipo de mensaje no es compatible con ChatWoot.**
|
||||
📱 Por favor, abre **WhatsApp** para verlo.
|
||||
|
||||
Detalles: [{{{details.text}}}]({{{details.url}}})
|
||||
|
||||
whatsapp.to.chatwoot.message.facebook.ad: |-
|
||||
📢 **ANUNCIO DE FACEBOOK**
|
||||
|
||||
**Título:** {{{adData.title}}}
|
||||
|
||||
**Descripción:**
|
||||
{{{adData.body}}}
|
||||
|
||||
**Enlace del anuncio:** [Ver en Facebook]({{{adData.sourceUrl}}})
|
||||
**ID del anuncio:** {{{adData.sourceId}}}
|
||||
|
||||
---
|
||||
💬 **Mensaje del cliente:**
|
||||
{{{payload.body}}}
|
||||
@@ -1,9 +1,29 @@
|
||||
# Persian translations for ChatWoot integration
|
||||
locale.name: '🇮🇷 فارسی (Persian)'
|
||||
app.inbox.contact.name: 'ادغام واتساپ (WAHA)'
|
||||
|
||||
# کد محلی پایه - باید یک محلی معتبر BCP 47 باشد
|
||||
# https://en.wikipedia.org/wiki/IETF_language_tag
|
||||
# WAHA از آن برای نمایش اعداد، ارز و تاریخ/زمان استفاده میکند
|
||||
locale.base: 'fa-IR'
|
||||
|
||||
app.inbox.contact.name: 'ادغام واتساپ'
|
||||
app.inbox.contact.avatar.url: 'https://raw.githubusercontent.com/devlikeapro/waha/core/logo.png'
|
||||
|
||||
job.report.error: |
|
||||
# گزینههای "options" از date.toLocaleString
|
||||
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options
|
||||
datetime:
|
||||
locales: fa-IR
|
||||
day: 2-digit
|
||||
month: 2-digit
|
||||
year: numeric
|
||||
hour: 2-digit
|
||||
minute: 2-digit
|
||||
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#timezonename
|
||||
timeZoneName: shortGeneric
|
||||
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
# timeZone: 'Asia/Tehran'
|
||||
|
||||
job.report.error: |-
|
||||
⚠️ **{{{header}}}**
|
||||
{{#attempts.nextDelay}}
|
||||
🔄 تلاش مجدد در {{attempts.nextDelay}} ثانیه...
|
||||
@@ -20,7 +40,7 @@ job.report.error: |
|
||||
```
|
||||
{{/error}}
|
||||
|
||||
job.report.succeeded: |
|
||||
job.report.succeeded: |-
|
||||
✅ **موفقیتآمیز**
|
||||
تلاش: {{{attempts.current}}} / {{{attempts.max}}}
|
||||
جزئیات: [{{{details.text}}}]({{{details.url}}})
|
||||
@@ -30,33 +50,33 @@ whatsapp.message.receiving.error: دریافت پیام از واتساپ امک
|
||||
whatsapp.message.removing.error: حذف پیام از واتساپ امکانپذیر نبود
|
||||
job.scheduled.error.header: اجرای کار زمانبندی شده ناموفق بود
|
||||
|
||||
message.from.whatsapp: |
|
||||
message.from.whatsapp: |-
|
||||
{{{text}}}
|
||||
|
||||
📱 *ارسال شده از واتساپ*
|
||||
|
||||
message.from.api: |
|
||||
message.from.api: |-
|
||||
{{{text}}}
|
||||
|
||||
📱 *ارسال شده از طریق API*
|
||||
|
||||
message.removed.in.whatsapp: |
|
||||
message.removed.in.whatsapp: |-
|
||||
❌ *این پیام در واتساپ حذف شده است*
|
||||
|
||||
message.edited.in.whatsapp: |
|
||||
message.edited.in.whatsapp: |-
|
||||
{{{text}}}
|
||||
|
||||
✏️ *ویرایش شده در واتساپ*
|
||||
|
||||
whatsapp.group.message: |
|
||||
{{{text}}}
|
||||
|
||||
whatsapp.group.message: |-
|
||||
👥 *{{{participant}}}*
|
||||
|
||||
whatsapp.reaction.added: |
|
||||
{{{text}}}
|
||||
|
||||
whatsapp.reaction.added: |-
|
||||
*واکنش* {{{emoji}}}
|
||||
|
||||
whatsapp.reaction.removed: |
|
||||
whatsapp.reaction.removed: |-
|
||||
*واکنش حذف شد*
|
||||
|
||||
whatsapp.contact.group.suffix: 'گروه'
|
||||
@@ -65,7 +85,7 @@ whatsapp.contact.broadcast.suffix: 'فهرست انتشار'
|
||||
# Aka Stories
|
||||
whatsapp.contact.status.name: 'وضعیت'
|
||||
|
||||
app.connected.message: |
|
||||
app.connected.message: |-
|
||||
🔗 **متصل: جلسه واتساپ به صندوق ورودی ChatWoot**
|
||||
|
||||
✅ جلسه واتساپ **{{{name}}}** با موفقیت به این صندوق ورودی ChatWoot متصل شده است.
|
||||
@@ -83,7 +103,7 @@ app.connected.message: |
|
||||
|
||||
بیایید شروع کنیم! 🚀
|
||||
|
||||
app.disconnected.message: |
|
||||
app.disconnected.message: |-
|
||||
🔌 **قطع اتصال: جلسه واتساپ از صندوق ورودی ChatWoot**
|
||||
|
||||
❌ جلسه واتساپ **{{{name}}}** از این صندوق ورودی ChatWoot قطع شده است.
|
||||
@@ -92,12 +112,12 @@ app.disconnected.message: |
|
||||
|
||||
برای اتصال مجدد، لطفاً با مدیر خود تماس بگیرید.
|
||||
|
||||
app.updated.message: |
|
||||
app.updated.message: |-
|
||||
🔄 **بهروزرسانی: تنظیمات جلسه واتساپ**
|
||||
|
||||
✅ تنظیمات جلسه واتساپ **{{{name}}}** بهروزرسانی شده است.
|
||||
|
||||
app.commands.list: |
|
||||
app.commands.list: |-
|
||||
شما میتوانید **ادغام واتساپ** را با ارسال یکی از دستورات زیر مدیریت کنید:
|
||||
|
||||
🖥️ **جلسه**:
|
||||
@@ -125,32 +145,32 @@ app.commands.server.disabled: ⛔ **دستورات سرور غیرفعال اس
|
||||
|
||||
برای دریافت فهرست دستورات، **help** را ارسال کنید.
|
||||
|
||||
app.help.reminder: |
|
||||
app.help.reminder: |-
|
||||
برای دریافت لیست دستورات موجود، **help** را ارسال کنید.
|
||||
|
||||
app.session.status.change: |
|
||||
app.session.status.change: |-
|
||||
{{{emoji}}} جلسه "{{{session}}}" به وضعیت {{{status}}} تغییر کرد
|
||||
|
||||
app.session.current.status: |
|
||||
app.session.current.status: |-
|
||||
{{{emoji}}} وضعیت جلسه **{{{session}}}** در **{{{status}}}** است
|
||||
**حساب واتساپ:**
|
||||
|
||||
📱 **{{{name}}} ({{{id}}})**
|
||||
|
||||
app.session.status.working: |
|
||||
app.session.status.working: |-
|
||||
✅ این صندوق ورودی ChatWoot به **حساب واتساپ** متصل است و آماده ارسال و دریافت پیام است!
|
||||
|
||||
📱 **{{{name}}} ({{{id}}})**
|
||||
|
||||
app.session.status.error: |
|
||||
app.session.status.error: |-
|
||||
⚠️ **این صندوق ورودی ChatWoot به حساب واتساپ متصل است اما آماده ارسال و دریافت پیام نیست!**
|
||||
|
||||
لطفاً وضعیت جلسه را بررسی کنید و سعی کنید آن را مجدداً راهاندازی کنید یا خارج شوید و کد QR را دوباره اسکن کنید.
|
||||
|
||||
app.session.scan.qr.code: |
|
||||
app.session.scan.qr.code: |-
|
||||
⚠️ **کد QR را در تلفن خود اسکن کنید تا حساب واتساپ را با این صندوق ورودی ChatWoot پیوند دهید!**
|
||||
|
||||
app.server.version.and.status: |
|
||||
app.server.version.and.status: |-
|
||||
**نسخه:**
|
||||
```
|
||||
{{{version}}}
|
||||
@@ -161,16 +181,16 @@ app.server.version.and.status: |
|
||||
{{{status}}}
|
||||
```
|
||||
|
||||
app.server.reboot: |
|
||||
app.server.reboot: |-
|
||||
سرور در حال راهاندازی مجدد نرم است...
|
||||
|
||||
app.server.reboot.force: |
|
||||
app.server.reboot.force: |-
|
||||
سرور در حال راهاندازی مجدد اجباری است...
|
||||
|
||||
app.logout.success: |
|
||||
app.logout.success: |-
|
||||
✅ حساب با موفقیت غیرمجاز شد!
|
||||
|
||||
waha.new.version.available: |
|
||||
waha.new.version.available: |-
|
||||
🔄 **نسخه جدید در دسترس است!**
|
||||
|
||||
نسخه فعلی: **{{{currentVersion}}}**
|
||||
@@ -178,7 +198,7 @@ waha.new.version.available: |
|
||||
|
||||
👉 موارد جدید را در [**🆕 تغییرات**]({{{changelogUrl}}}) مشاهده کنید
|
||||
|
||||
waha.core.version.used: |
|
||||
waha.core.version.used: |-
|
||||
❤️ **از WAHA پشتیبانی کنید!**
|
||||
|
||||
شما از نسخه رایگان **WAHA Core** استفاده میکنید. اگر این پروژه را مفید میدانید، لطفاً حمایت از توسعه آن را در نظر بگیرید.
|
||||
@@ -187,20 +207,20 @@ waha.core.version.used: |
|
||||
|
||||
[**🎁 از ما حمایت کنید**]({{{supportUrl}}})
|
||||
|
||||
chatwoot.to.whatsapp.message.text: |
|
||||
chatwoot.to.whatsapp.message.text: |-
|
||||
{{{ content }}}
|
||||
|
||||
chatwoot.to.whatsapp.message.media.caption: |
|
||||
chatwoot.to.whatsapp.message.media.caption: |-
|
||||
{{#singleAttachment}}
|
||||
{{#content}}
|
||||
{{{ content }}}
|
||||
{{/content}}
|
||||
{{/singleAttachment}}
|
||||
|
||||
whatsapp.to.chatwoot.message: |
|
||||
whatsapp.to.chatwoot.message: |-
|
||||
{{{payload.body}}}
|
||||
|
||||
whatsapp.to.chatwoot.message.contacts: |
|
||||
whatsapp.to.chatwoot.message.contacts: |-
|
||||
👤 **مخاطب(ها)ی بهاشتراکگذاشتهشده**
|
||||
|
||||
{{#contacts}}
|
||||
@@ -211,12 +231,24 @@ whatsapp.to.chatwoot.message.contacts: |
|
||||
|
||||
{{/contacts}}
|
||||
|
||||
whatsapp.to.chatwoot.message.location: |
|
||||
whatsapp.to.chatwoot.message.location: |-
|
||||
{{#message}}
|
||||
{{#locationMessage}}
|
||||
📍 **موقعیت مکانی بهاشتراکگذاشتهشده**
|
||||
|
||||
https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#name}}
|
||||
**{{name}}**
|
||||
{{/name}}
|
||||
|
||||
{{#address}}
|
||||
📍 **آدرس:** {{address}}
|
||||
{{/address}}
|
||||
|
||||
{{#url}}
|
||||
🌐 **وبسایت:** {{url}}
|
||||
{{/url}}
|
||||
|
||||
🔗 **مشاهده روی نقشه:** https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#caption}}{{caption}}{{/caption}}
|
||||
{{/locationMessage}}
|
||||
|
||||
@@ -224,13 +256,127 @@ whatsapp.to.chatwoot.message.location: |
|
||||
📍📡 **اشتراکگذاری موقعیت مکانی زنده**
|
||||
برای دیدن بهروزرسانیهای لحظهای **WhatsApp** را باز کنید.
|
||||
|
||||
https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#name}}
|
||||
**{{name}}**
|
||||
{{/name}}
|
||||
|
||||
{{#address}}
|
||||
📍 **آدرس:** {{address}}
|
||||
{{/address}}
|
||||
|
||||
{{#url}}
|
||||
🌐 **وبسایت:** {{url}}
|
||||
{{/url}}
|
||||
|
||||
🔗 **مشاهده روی نقشه:** https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#caption}}{{caption}}{{/caption}}
|
||||
{{/liveLocationMessage}}
|
||||
{{/message}}
|
||||
|
||||
whatsapp.to.chatwoot.message.unsupported: |
|
||||
whatsapp.to.chatwoot.message.poll: |-
|
||||
{{#poll}}
|
||||
📊 **نظرسنجی**
|
||||
|
||||
**{{name}}**
|
||||
{{#options}}
|
||||
- {{optionName}}
|
||||
{{/options}}
|
||||
{{/poll}}
|
||||
|
||||
whatsapp.to.chatwoot.message.list: |-
|
||||
{{#message.listMessage}}
|
||||
{{#title}}
|
||||
*{{{title}}}*
|
||||
{{/title}}
|
||||
{{#description}}
|
||||
{{{description}}}
|
||||
{{/description}}
|
||||
{{#footerText}}
|
||||
{{{footerText}}}
|
||||
{{/footerText}}
|
||||
|
||||
{{#buttonText}}
|
||||
{{{buttonText}}}
|
||||
{{/buttonText}}
|
||||
{{#sections}}
|
||||
{{#title}}
|
||||
{{{title}}}:
|
||||
{{/title}}
|
||||
{{#rows}}
|
||||
{{#title}}
|
||||
- {{{title}}}
|
||||
{{/title}}
|
||||
{{/rows}}
|
||||
|
||||
{{/sections}}
|
||||
{{/message.listMessage}}
|
||||
|
||||
whatsapp.to.chatwoot.message.event: |-
|
||||
{{#message}}
|
||||
{{#eventMessage}}
|
||||
📅 **رویداد**
|
||||
|
||||
**{{name}}**
|
||||
{{#description}}
|
||||
{{description}}
|
||||
{{/description}}
|
||||
|
||||
{{#location.name}}
|
||||
📍 **مکان:** {{location.name}}
|
||||
{{/location.name}}
|
||||
{{#startTime}}
|
||||
🕐 **شروع:** {{startTime}}
|
||||
{{/startTime}}
|
||||
{{#endTime}}
|
||||
🕐 **پایان:** {{endTime}}
|
||||
{{/endTime}}
|
||||
{{#joinLink}}
|
||||
🔗 **لینک پیوستن:** [{{joinLink}}]({{joinLink}})
|
||||
{{/joinLink}}
|
||||
{{/eventMessage}}
|
||||
{{/message}}
|
||||
|
||||
whatsapp.to.chatwoot.message.pix: |-
|
||||
💳 **PIX - کپی و چسباندن**
|
||||
|
||||
{{#pixData}}
|
||||
{{#merchantName}}
|
||||
**{{merchantName}}**
|
||||
{{/merchantName}}
|
||||
|
||||
{{#key}}
|
||||
**کلید PIX:** {{key}}
|
||||
{{/key}}
|
||||
{{#keyType}}
|
||||
**نوع:** {{keyType}}
|
||||
{{/keyType}}
|
||||
{{#totalAmount}}
|
||||
**مبلغ:** {{totalAmountFormatted}}
|
||||
{{/totalAmount}}
|
||||
{{#referenceId}}
|
||||
**شناسه مرجع:** {{referenceId}}
|
||||
{{/referenceId}}
|
||||
|
||||
💳 **PIX کپی و چسباندن ارسال شد**
|
||||
{{/pixData}}
|
||||
|
||||
whatsapp.to.chatwoot.message.unsupported: |-
|
||||
⚠️ **این نوع پیام در ChatWoot پشتیبانی نمیشود.**
|
||||
📱 لطفاً برای مشاهده آن **WhatsApp** را باز کنید.
|
||||
|
||||
جزئیات: [{{{details.text}}}]({{{details.url}}})
|
||||
|
||||
whatsapp.to.chatwoot.message.facebook.ad: |-
|
||||
📢 **آگهی فیسبوک**
|
||||
|
||||
**عنوان:** {{{adData.title}}}
|
||||
|
||||
**توضیحات:**
|
||||
{{{adData.body}}}
|
||||
|
||||
**لینک آگهی:** [مشاهده در فیسبوک]({{{adData.sourceUrl}}})
|
||||
**شناسه آگهی:** {{{adData.sourceId}}}
|
||||
|
||||
---
|
||||
💬 **پیام مشتری:**
|
||||
{{{payload.body}}}
|
||||
@@ -1,9 +1,29 @@
|
||||
# French translations for ChatWoot integration
|
||||
locale.name: '🇫🇷 Français (French)'
|
||||
app.inbox.contact.name: 'Intégration WhatsApp (WAHA)'
|
||||
|
||||
# Code de locale de base - doit être une locale BCP 47 valide
|
||||
# https://en.wikipedia.org/wiki/IETF_language_tag
|
||||
# WAHA l'utilise pour le formatage des nombres, devises et dates/heures
|
||||
locale.base: 'fr-FR'
|
||||
|
||||
app.inbox.contact.name: 'Intégration WhatsApp'
|
||||
app.inbox.contact.avatar.url: 'https://raw.githubusercontent.com/devlikeapro/waha/core/logo.png'
|
||||
|
||||
job.report.error: |
|
||||
# "options" de date.toLocaleString
|
||||
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options
|
||||
datetime:
|
||||
locales: fr-FR
|
||||
day: 2-digit
|
||||
month: 2-digit
|
||||
year: numeric
|
||||
hour: 2-digit
|
||||
minute: 2-digit
|
||||
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#timezonename
|
||||
timeZoneName: shortGeneric
|
||||
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
# timeZone: 'Europe/Paris'
|
||||
|
||||
job.report.error: |-
|
||||
⚠️ **{{{header}}}**
|
||||
{{#attempts.nextDelay}}
|
||||
🔄 Nouvelle tentative dans {{attempts.nextDelay}} secondes...
|
||||
@@ -20,7 +40,7 @@ job.report.error: |
|
||||
```
|
||||
{{/error}}
|
||||
|
||||
job.report.succeeded: |
|
||||
job.report.succeeded: |-
|
||||
✅ **Réussi**
|
||||
Tentative : {{{attempts.current}}} / {{{attempts.max}}}
|
||||
Détails : [{{{details.text}}}]({{{details.url}}})
|
||||
@@ -30,33 +50,33 @@ whatsapp.message.receiving.error: Impossible de recevoir un message de WhatsApp
|
||||
whatsapp.message.removing.error: Impossible de supprimer un message de WhatsApp
|
||||
job.scheduled.error.header: La tâche planifiée n'a pas pu être exécutée
|
||||
|
||||
message.from.whatsapp: |
|
||||
message.from.whatsapp: |-
|
||||
{{{text}}}
|
||||
|
||||
📱 *Envoyé depuis WhatsApp*
|
||||
|
||||
message.from.api: |
|
||||
message.from.api: |-
|
||||
{{{text}}}
|
||||
|
||||
📱 *Envoyé via API*
|
||||
|
||||
message.removed.in.whatsapp: |
|
||||
message.removed.in.whatsapp: |-
|
||||
❌ *Ce message a été supprimé dans WhatsApp*
|
||||
|
||||
message.edited.in.whatsapp: |
|
||||
message.edited.in.whatsapp: |-
|
||||
{{{text}}}
|
||||
|
||||
✏️ *Modifié dans WhatsApp*
|
||||
|
||||
whatsapp.group.message: |
|
||||
{{{text}}}
|
||||
|
||||
whatsapp.group.message: |-
|
||||
👥 *{{{participant}}}*
|
||||
|
||||
whatsapp.reaction.added: |
|
||||
{{{text}}}
|
||||
|
||||
whatsapp.reaction.added: |-
|
||||
*A réagi avec* {{{emoji}}}
|
||||
|
||||
whatsapp.reaction.removed: |
|
||||
whatsapp.reaction.removed: |-
|
||||
*Réaction supprimée*
|
||||
|
||||
whatsapp.contact.group.suffix: 'Groupe'
|
||||
@@ -65,7 +85,7 @@ whatsapp.contact.broadcast.suffix: 'Liste de diffusion'
|
||||
# Aka Stories
|
||||
whatsapp.contact.status.name: 'Statut'
|
||||
|
||||
app.connected.message: |
|
||||
app.connected.message: |-
|
||||
🔗 **CONNECTÉ : Session WhatsApp à la Boîte de Réception ChatWoot**
|
||||
|
||||
✅ La session WhatsApp **{{{name}}}** a été connectée avec succès à cette Boîte de Réception ChatWoot.
|
||||
@@ -83,7 +103,7 @@ app.connected.message: |
|
||||
|
||||
Commençons ! 🚀
|
||||
|
||||
app.disconnected.message: |
|
||||
app.disconnected.message: |-
|
||||
🔌 **DÉCONNECTÉ : Session WhatsApp de la Boîte de Réception ChatWoot**
|
||||
|
||||
❌ La session WhatsApp **{{{name}}}** a été déconnectée de cette Boîte de Réception ChatWoot.
|
||||
@@ -92,12 +112,12 @@ app.disconnected.message: |
|
||||
|
||||
Pour vous reconnecter, veuillez contacter votre administrateur.
|
||||
|
||||
app.updated.message: |
|
||||
app.updated.message: |-
|
||||
🔄 **MIS À JOUR : Paramètres de Session WhatsApp**
|
||||
|
||||
✅ Les paramètres de la session WhatsApp **{{{name}}}** ont été mis à jour.
|
||||
|
||||
app.commands.list: |
|
||||
app.commands.list: |-
|
||||
Vous pouvez gérer l'**Intégration WhatsApp** en envoyant l'une des commandes suivantes :
|
||||
|
||||
🖥️ **Session** :
|
||||
@@ -125,32 +145,32 @@ app.commands.server.disabled: ⛔ **Les commandes serveur sont désactivées**.
|
||||
|
||||
Envoyez **help** pour obtenir la liste des commandes disponibles.
|
||||
|
||||
app.help.reminder: |
|
||||
app.help.reminder: |-
|
||||
Envoyez **help** pour obtenir la liste des commandes disponibles.
|
||||
|
||||
app.session.status.change: |
|
||||
app.session.status.change: |-
|
||||
{{{emoji}}} La session "{{{session}}}" est passée au statut {{{status}}}
|
||||
|
||||
app.session.current.status: |
|
||||
app.session.current.status: |-
|
||||
{{{emoji}}} Le statut de la session **{{{session}}}** est **{{{status}}}**
|
||||
**Compte WhatsApp :**
|
||||
|
||||
📱 **{{{name}}} ({{{id}}})**
|
||||
|
||||
app.session.status.working: |
|
||||
app.session.status.working: |-
|
||||
✅ Cette Boîte de Réception ChatWoot est liée au **Compte WhatsApp** et prête à envoyer et recevoir des messages !
|
||||
|
||||
📱 **{{{name}}} ({{{id}}})**
|
||||
|
||||
app.session.status.error: |
|
||||
app.session.status.error: |-
|
||||
⚠️ **Cette Boîte de Réception ChatWoot est liée au Compte WhatsApp mais N'EST PAS prête à envoyer et recevoir des messages !**
|
||||
|
||||
Veuillez vérifier l'état de la session et essayer de la redémarrer ou déconnectez-vous et scannez à nouveau le code QR.
|
||||
|
||||
app.session.scan.qr.code: |
|
||||
app.session.scan.qr.code: |-
|
||||
⚠️ **Scannez le code QR sur votre téléphone pour lier le Compte WhatsApp à cette Boîte de Réception ChatWoot !**
|
||||
|
||||
app.server.version.and.status: |
|
||||
app.server.version.and.status: |-
|
||||
**Version :**
|
||||
```
|
||||
{{{version}}}
|
||||
@@ -161,16 +181,16 @@ app.server.version.and.status: |
|
||||
{{{status}}}
|
||||
```
|
||||
|
||||
app.server.reboot: |
|
||||
app.server.reboot: |-
|
||||
Le serveur redémarre en douceur...
|
||||
|
||||
app.server.reboot.force: |
|
||||
app.server.reboot.force: |-
|
||||
Le serveur redémarre de force...
|
||||
|
||||
app.logout.success: |
|
||||
app.logout.success: |-
|
||||
✅ Compte déconnecté avec succès !
|
||||
|
||||
waha.new.version.available: |
|
||||
waha.new.version.available: |-
|
||||
🔄 **Nouvelle Version Disponible !**
|
||||
|
||||
Version actuelle : **{{{currentVersion}}}**
|
||||
@@ -178,7 +198,7 @@ waha.new.version.available: |
|
||||
|
||||
👉 Découvrez les nouveautés dans le [**🆕 Journal des modifications**]({{{changelogUrl}}})
|
||||
|
||||
waha.core.version.used: |
|
||||
waha.core.version.used: |-
|
||||
❤️ **Soutenez WAHA !**
|
||||
|
||||
Vous utilisez la version gratuite **WAHA Core**. Si vous trouvez ce projet utile, veuillez envisager de soutenir son développement.
|
||||
@@ -187,20 +207,20 @@ waha.core.version.used: |
|
||||
|
||||
[**🎁 Soutenez-nous**]({{{supportUrl}}})
|
||||
|
||||
chatwoot.to.whatsapp.message.text: |
|
||||
chatwoot.to.whatsapp.message.text: |-
|
||||
{{{ content }}}
|
||||
|
||||
chatwoot.to.whatsapp.message.media.caption: |
|
||||
chatwoot.to.whatsapp.message.media.caption: |-
|
||||
{{#singleAttachment}}
|
||||
{{#content}}
|
||||
{{{ content }}}
|
||||
{{/content}}
|
||||
{{/singleAttachment}}
|
||||
|
||||
whatsapp.to.chatwoot.message: |
|
||||
whatsapp.to.chatwoot.message: |-
|
||||
{{{payload.body}}}
|
||||
|
||||
whatsapp.to.chatwoot.message.contacts: |
|
||||
whatsapp.to.chatwoot.message.contacts: |-
|
||||
👤 **Contact(s) partagé(s)**
|
||||
|
||||
{{#contacts}}
|
||||
@@ -211,12 +231,24 @@ whatsapp.to.chatwoot.message.contacts: |
|
||||
|
||||
{{/contacts}}
|
||||
|
||||
whatsapp.to.chatwoot.message.location: |
|
||||
whatsapp.to.chatwoot.message.location: |-
|
||||
{{#message}}
|
||||
{{#locationMessage}}
|
||||
📍 **Position partagée**
|
||||
|
||||
https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#name}}
|
||||
**{{name}}**
|
||||
{{/name}}
|
||||
|
||||
{{#address}}
|
||||
📍 **Adresse :** {{address}}
|
||||
{{/address}}
|
||||
|
||||
{{#url}}
|
||||
🌐 **Site web :** {{url}}
|
||||
{{/url}}
|
||||
|
||||
🔗 **Voir sur la carte :** https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#caption}}{{caption}}{{/caption}}
|
||||
{{/locationMessage}}
|
||||
|
||||
@@ -224,13 +256,127 @@ whatsapp.to.chatwoot.message.location: |
|
||||
📍📡 **Partage de position en direct**
|
||||
Ouvrez **WhatsApp** pour voir les mises à jour en temps réel.
|
||||
|
||||
https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#name}}
|
||||
**{{name}}**
|
||||
{{/name}}
|
||||
|
||||
{{#address}}
|
||||
📍 **Adresse :** {{address}}
|
||||
{{/address}}
|
||||
|
||||
{{#url}}
|
||||
🌐 **Site web :** {{url}}
|
||||
{{/url}}
|
||||
|
||||
🔗 **Voir sur la carte :** https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#caption}}{{caption}}{{/caption}}
|
||||
{{/liveLocationMessage}}
|
||||
{{/message}}
|
||||
|
||||
whatsapp.to.chatwoot.message.unsupported: |
|
||||
whatsapp.to.chatwoot.message.poll: |-
|
||||
{{#poll}}
|
||||
📊 **Sondage**
|
||||
|
||||
**{{name}}**
|
||||
{{#options}}
|
||||
- {{optionName}}
|
||||
{{/options}}
|
||||
{{/poll}}
|
||||
|
||||
whatsapp.to.chatwoot.message.list: |-
|
||||
{{#message.listMessage}}
|
||||
{{#title}}
|
||||
*{{{title}}}*
|
||||
{{/title}}
|
||||
{{#description}}
|
||||
{{{description}}}
|
||||
{{/description}}
|
||||
{{#footerText}}
|
||||
{{{footerText}}}
|
||||
{{/footerText}}
|
||||
|
||||
{{#buttonText}}
|
||||
{{{buttonText}}}
|
||||
{{/buttonText}}
|
||||
{{#sections}}
|
||||
{{#title}}
|
||||
{{{title}}}:
|
||||
{{/title}}
|
||||
{{#rows}}
|
||||
{{#title}}
|
||||
- {{{title}}}
|
||||
{{/title}}
|
||||
{{/rows}}
|
||||
|
||||
{{/sections}}
|
||||
{{/message.listMessage}}
|
||||
|
||||
whatsapp.to.chatwoot.message.event: |-
|
||||
{{#message}}
|
||||
{{#eventMessage}}
|
||||
📅 **Événement**
|
||||
|
||||
**{{name}}**
|
||||
{{#description}}
|
||||
{{description}}
|
||||
{{/description}}
|
||||
|
||||
{{#location.name}}
|
||||
📍 **Lieu :** {{location.name}}
|
||||
{{/location.name}}
|
||||
{{#startTime}}
|
||||
🕐 **Début :** {{startTime}}
|
||||
{{/startTime}}
|
||||
{{#endTime}}
|
||||
🕐 **Fin :** {{endTime}}
|
||||
{{/endTime}}
|
||||
{{#joinLink}}
|
||||
🔗 **Lien de participation :** [{{joinLink}}]({{joinLink}})
|
||||
{{/joinLink}}
|
||||
{{/eventMessage}}
|
||||
{{/message}}
|
||||
|
||||
whatsapp.to.chatwoot.message.pix: |-
|
||||
💳 **PIX - Copier et Coller**
|
||||
|
||||
{{#pixData}}
|
||||
{{#merchantName}}
|
||||
**{{merchantName}}**
|
||||
{{/merchantName}}
|
||||
|
||||
{{#key}}
|
||||
**Clé PIX :** {{key}}
|
||||
{{/key}}
|
||||
{{#keyType}}
|
||||
**Type :** {{keyType}}
|
||||
{{/keyType}}
|
||||
{{#totalAmount}}
|
||||
**Montant :** {{totalAmountFormatted}}
|
||||
{{/totalAmount}}
|
||||
{{#referenceId}}
|
||||
**Référence :** {{referenceId}}
|
||||
{{/referenceId}}
|
||||
|
||||
💳 **PIX Copier et Coller envoyé**
|
||||
{{/pixData}}
|
||||
|
||||
whatsapp.to.chatwoot.message.unsupported: |-
|
||||
⚠️ **Ce type de message n’est pas pris en charge dans ChatWoot.**
|
||||
📱 Veuillez ouvrir **WhatsApp** pour l’afficher.
|
||||
|
||||
Détails: [{{{details.text}}}]({{{details.url}}})
|
||||
|
||||
whatsapp.to.chatwoot.message.facebook.ad: |-
|
||||
📢 **PUBLICITÉ FACEBOOK**
|
||||
|
||||
**Titre:** {{{adData.title}}}
|
||||
|
||||
**Description:**
|
||||
{{{adData.body}}}
|
||||
|
||||
**Lien de l'annonce :** [Voir sur Facebook]({{{adData.sourceUrl}}})
|
||||
**ID de l'annonce :** {{{adData.sourceId}}}
|
||||
|
||||
---
|
||||
💬 **Message du client :**
|
||||
{{{payload.body}}}
|
||||
@@ -1,9 +1,29 @@
|
||||
# Hebrew translations for ChatWoot integration
|
||||
locale.name: '🇮🇱 עברית (Hebrew)'
|
||||
app.inbox.contact.name: 'אינטגרציית וואטסאפ (WAHA)'
|
||||
|
||||
# קוד הלוקאל הבסיסי - חייב להיות לוקאל תקין לפי BCP 47
|
||||
# https://en.wikipedia.org/wiki/IETF_language_tag
|
||||
# WAHA משתמש בכך להצגת מספרים, מטבע ותאריך/שעה
|
||||
locale.base: 'he-IL'
|
||||
|
||||
app.inbox.contact.name: 'אינטגרציית וואטסאפ'
|
||||
app.inbox.contact.avatar.url: 'https://raw.githubusercontent.com/devlikeapro/waha/core/logo.png'
|
||||
|
||||
job.report.error: |
|
||||
# "אפשרויות" של date.toLocaleString
|
||||
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options
|
||||
datetime:
|
||||
locales: he-IL
|
||||
day: 2-digit
|
||||
month: 2-digit
|
||||
year: numeric
|
||||
hour: 2-digit
|
||||
minute: 2-digit
|
||||
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#timezonename
|
||||
timeZoneName: shortGeneric
|
||||
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
# timeZone: 'Asia/Jerusalem'
|
||||
|
||||
job.report.error: |-
|
||||
⚠️ **{{{header}}}**
|
||||
{{#attempts.nextDelay}}
|
||||
🔄 מנסה שוב בעוד {{attempts.nextDelay}} שניות...
|
||||
@@ -20,7 +40,7 @@ job.report.error: |
|
||||
```
|
||||
{{/error}}
|
||||
|
||||
job.report.succeeded: |
|
||||
job.report.succeeded: |-
|
||||
✅ **הצליח**
|
||||
ניסיון: {{{attempts.current}}} / {{{attempts.max}}}
|
||||
פרטים: [{{{details.text}}}]({{{details.url}}})
|
||||
@@ -30,33 +50,33 @@ whatsapp.message.receiving.error: לא ניתן לקבל הודעה מוואטס
|
||||
whatsapp.message.removing.error: לא ניתן להסיר הודעה מוואטסאפ
|
||||
job.scheduled.error.header: המשימה המתוזמנת נכשלה בביצוע
|
||||
|
||||
message.from.whatsapp: |
|
||||
message.from.whatsapp: |-
|
||||
{{{text}}}
|
||||
|
||||
📱 *נשלח מוואטסאפ*
|
||||
|
||||
message.from.api: |
|
||||
message.from.api: |-
|
||||
{{{text}}}
|
||||
|
||||
📱 *נשלח דרך API*
|
||||
|
||||
message.removed.in.whatsapp: |
|
||||
message.removed.in.whatsapp: |-
|
||||
❌ *הודעה זו נמחקה בוואטסאפ*
|
||||
|
||||
message.edited.in.whatsapp: |
|
||||
message.edited.in.whatsapp: |-
|
||||
{{{text}}}
|
||||
|
||||
✏️ *נערך בוואטסאפ*
|
||||
|
||||
whatsapp.group.message: |
|
||||
{{{text}}}
|
||||
|
||||
whatsapp.group.message: |-
|
||||
👥 *{{{participant}}}*
|
||||
|
||||
whatsapp.reaction.added: |
|
||||
{{{text}}}
|
||||
|
||||
whatsapp.reaction.added: |-
|
||||
*הגיב* {{{emoji}}}
|
||||
|
||||
whatsapp.reaction.removed: |
|
||||
whatsapp.reaction.removed: |-
|
||||
*התגובה הוסרה*
|
||||
|
||||
whatsapp.contact.group.suffix: 'קבוצה'
|
||||
@@ -65,7 +85,7 @@ whatsapp.contact.broadcast.suffix: 'רשימת שידור'
|
||||
# Aka Stories
|
||||
whatsapp.contact.status.name: 'סטטוס'
|
||||
|
||||
app.connected.message: |
|
||||
app.connected.message: |-
|
||||
🔗 **מחובר: הפעלת וואטסאפ לתיבת הדואר הנכנס של ChatWoot**
|
||||
|
||||
✅ הפעלת וואטסאפ **{{{name}}}** חוברה בהצלחה לתיבת הדואר הנכנס של ChatWoot.
|
||||
@@ -83,7 +103,7 @@ app.connected.message: |
|
||||
|
||||
בוא נתחיל! 🚀
|
||||
|
||||
app.disconnected.message: |
|
||||
app.disconnected.message: |-
|
||||
🔌 **מנותק: הפעלת וואטסאפ מתיבת הדואר הנכנס של ChatWoot**
|
||||
|
||||
❌ הפעלת וואטסאפ **{{{name}}}** נותקה מתיבת הדואר הנכנס של ChatWoot.
|
||||
@@ -92,12 +112,12 @@ app.disconnected.message: |
|
||||
|
||||
כדי להתחבר מחדש, אנא פנה למנהל המערכת שלך.
|
||||
|
||||
app.updated.message: |
|
||||
app.updated.message: |-
|
||||
🔄 **עודכן: הגדרות הפעלת וואטסאפ**
|
||||
|
||||
✅ ההגדרות עבור הפעלת וואטסאפ **{{{name}}}** עודכנו.
|
||||
|
||||
app.commands.list: |
|
||||
app.commands.list: |-
|
||||
אתה יכול לנהל **אינטגרציית וואטסאפ** על ידי שליחת אחת מהפקודות הבאות:
|
||||
|
||||
🖥️ **הפעלה**:
|
||||
@@ -125,32 +145,32 @@ app.commands.server.disabled: ⛔ **פקודות השרת מושבתות**.
|
||||
|
||||
שלחו **help** כדי לקבל את רשימת הפקודות הזמינות.
|
||||
|
||||
app.help.reminder: |
|
||||
app.help.reminder: |-
|
||||
שלח **help** כדי לקבל את רשימת הפקודות הזמינות.
|
||||
|
||||
app.session.status.change: |
|
||||
app.session.status.change: |-
|
||||
{{{emoji}}} הפעלה "{{{session}}}" עברה לסטטוס {{{status}}}
|
||||
|
||||
app.session.current.status: |
|
||||
app.session.current.status: |-
|
||||
{{{emoji}}} סטטוס ההפעלה **{{{session}}}** הוא **{{{status}}}**
|
||||
**חשבון וואטסאפ:**
|
||||
|
||||
📱 **{{{name}}} ({{{id}}})**
|
||||
|
||||
app.session.status.working: |
|
||||
app.session.status.working: |-
|
||||
✅ תיבת הדואר הנכנס של ChatWoot מקושרת ל**חשבון וואטסאפ** ומוכנה לשלוח ולקבל הודעות!
|
||||
|
||||
📱 **{{{name}}} ({{{id}}})**
|
||||
|
||||
app.session.status.error: |
|
||||
app.session.status.error: |-
|
||||
⚠️ **תיבת הדואר הנכנס של ChatWoot מקושרת לחשבון וואטסאפ אך אינה מוכנה לשלוח ולקבל הודעות!**
|
||||
|
||||
אנא בדוק את סטטוס ההפעלה ונסה להפעיל אותה מחדש או התנתק וסרוק את קוד ה-QR שוב.
|
||||
|
||||
app.session.scan.qr.code: |
|
||||
app.session.scan.qr.code: |-
|
||||
⚠️ **סרוק את קוד ה-QR בטלפון שלך כדי לקשר את חשבון הוואטסאפ לתיבת הדואר הנכנס של ChatWoot!**
|
||||
|
||||
app.server.version.and.status: |
|
||||
app.server.version.and.status: |-
|
||||
**גרסה:**
|
||||
```
|
||||
{{{version}}}
|
||||
@@ -161,16 +181,16 @@ app.server.version.and.status: |
|
||||
{{{status}}}
|
||||
```
|
||||
|
||||
app.server.reboot: |
|
||||
app.server.reboot: |-
|
||||
השרת מופעל מחדש בצורה חלקה...
|
||||
|
||||
app.server.reboot.force: |
|
||||
app.server.reboot.force: |-
|
||||
השרת מופעל מחדש בכוח...
|
||||
|
||||
app.logout.success: |
|
||||
app.logout.success: |-
|
||||
✅ החשבון בוטל בהצלחה!
|
||||
|
||||
waha.new.version.available: |
|
||||
waha.new.version.available: |-
|
||||
🔄 **גרסה חדשה זמינה!**
|
||||
|
||||
גרסה נוכחית: **{{{currentVersion}}}**
|
||||
@@ -178,7 +198,7 @@ waha.new.version.available: |
|
||||
|
||||
👉 בדוק מה חדש ב[**🆕 יומן שינויים**]({{{changelogUrl}}})
|
||||
|
||||
waha.core.version.used: |
|
||||
waha.core.version.used: |-
|
||||
❤️ **תמוך ב-WAHA!**
|
||||
|
||||
אתה משתמש בגרסת **WAHA Core** החינמית. אם אתה מוצא פרויקט זה שימושי, אנא שקול לתמוך בפיתוח שלו.
|
||||
@@ -187,20 +207,20 @@ waha.core.version.used: |
|
||||
|
||||
[**🎁 תמוך בנו**]({{{supportUrl}}})
|
||||
|
||||
chatwoot.to.whatsapp.message.text: |
|
||||
chatwoot.to.whatsapp.message.text: |-
|
||||
{{{ content }}}
|
||||
|
||||
chatwoot.to.whatsapp.message.media.caption: |
|
||||
chatwoot.to.whatsapp.message.media.caption: |-
|
||||
{{#singleAttachment}}
|
||||
{{#content}}
|
||||
{{{ content }}}
|
||||
{{/content}}
|
||||
{{/singleAttachment}}
|
||||
|
||||
whatsapp.to.chatwoot.message: |
|
||||
whatsapp.to.chatwoot.message: |-
|
||||
{{{payload.body}}}
|
||||
|
||||
whatsapp.to.chatwoot.message.contacts: |
|
||||
whatsapp.to.chatwoot.message.contacts: |-
|
||||
👤 **אנשי קשר משותפים**
|
||||
|
||||
{{#contacts}}
|
||||
@@ -211,12 +231,24 @@ whatsapp.to.chatwoot.message.contacts: |
|
||||
|
||||
{{/contacts}}
|
||||
|
||||
whatsapp.to.chatwoot.message.location: |
|
||||
whatsapp.to.chatwoot.message.location: |-
|
||||
{{#message}}
|
||||
{{#locationMessage}}
|
||||
📍 **מיקום משותף**
|
||||
|
||||
https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#name}}
|
||||
**{{name}}**
|
||||
{{/name}}
|
||||
|
||||
{{#address}}
|
||||
📍 **כתובת:** {{address}}
|
||||
{{/address}}
|
||||
|
||||
{{#url}}
|
||||
🌐 **אתר אינטרנט:** {{url}}
|
||||
{{/url}}
|
||||
|
||||
🔗 **הצג במפה:** https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#caption}}{{caption}}{{/caption}}
|
||||
{{/locationMessage}}
|
||||
|
||||
@@ -224,13 +256,127 @@ whatsapp.to.chatwoot.message.location: |
|
||||
📍📡 **משתף מיקום חי**
|
||||
פתח/י את **WhatsApp** כדי לראות עדכונים בזמן אמת.
|
||||
|
||||
https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#name}}
|
||||
**{{name}}**
|
||||
{{/name}}
|
||||
|
||||
{{#address}}
|
||||
📍 **כתובת:** {{address}}
|
||||
{{/address}}
|
||||
|
||||
{{#url}}
|
||||
🌐 **אתר אינטרנט:** {{url}}
|
||||
{{/url}}
|
||||
|
||||
🔗 **הצג במפה:** https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#caption}}{{caption}}{{/caption}}
|
||||
{{/liveLocationMessage}}
|
||||
{{/message}}
|
||||
|
||||
whatsapp.to.chatwoot.message.unsupported: |
|
||||
whatsapp.to.chatwoot.message.poll: |-
|
||||
{{#poll}}
|
||||
📊 **סקר**
|
||||
|
||||
**{{name}}**
|
||||
{{#options}}
|
||||
- {{optionName}}
|
||||
{{/options}}
|
||||
{{/poll}}
|
||||
|
||||
whatsapp.to.chatwoot.message.list: |-
|
||||
{{#message.listMessage}}
|
||||
{{#title}}
|
||||
*{{{title}}}*
|
||||
{{/title}}
|
||||
{{#description}}
|
||||
{{{description}}}
|
||||
{{/description}}
|
||||
{{#footerText}}
|
||||
{{{footerText}}}
|
||||
{{/footerText}}
|
||||
|
||||
{{#buttonText}}
|
||||
{{{buttonText}}}
|
||||
{{/buttonText}}
|
||||
{{#sections}}
|
||||
{{#title}}
|
||||
{{{title}}}:
|
||||
{{/title}}
|
||||
{{#rows}}
|
||||
{{#title}}
|
||||
- {{{title}}}
|
||||
{{/title}}
|
||||
{{/rows}}
|
||||
|
||||
{{/sections}}
|
||||
{{/message.listMessage}}
|
||||
|
||||
whatsapp.to.chatwoot.message.event: |-
|
||||
{{#message}}
|
||||
{{#eventMessage}}
|
||||
📅 **אירוע**
|
||||
|
||||
**{{name}}**
|
||||
{{#description}}
|
||||
{{description}}
|
||||
{{/description}}
|
||||
|
||||
{{#location.name}}
|
||||
📍 **מיקום:** {{location.name}}
|
||||
{{/location.name}}
|
||||
{{#startTime}}
|
||||
🕐 **התחלה:** {{startTime}}
|
||||
{{/startTime}}
|
||||
{{#endTime}}
|
||||
🕐 **סיום:** {{endTime}}
|
||||
{{/endTime}}
|
||||
{{#joinLink}}
|
||||
🔗 **קישור הצטרפות:** [{{joinLink}}]({{joinLink}})
|
||||
{{/joinLink}}
|
||||
{{/eventMessage}}
|
||||
{{/message}}
|
||||
|
||||
whatsapp.to.chatwoot.message.pix: |-
|
||||
💳 **PIX - העתק והדבק**
|
||||
|
||||
{{#pixData}}
|
||||
{{#merchantName}}
|
||||
**{{merchantName}}**
|
||||
{{/merchantName}}
|
||||
|
||||
{{#key}}
|
||||
**מפתח PIX:** {{key}}
|
||||
{{/key}}
|
||||
{{#keyType}}
|
||||
**סוג:** {{keyType}}
|
||||
{{/keyType}}
|
||||
{{#totalAmount}}
|
||||
**סכום:** {{totalAmountFormatted}}
|
||||
{{/totalAmount}}
|
||||
{{#referenceId}}
|
||||
**אסמכתא:** {{referenceId}}
|
||||
{{/referenceId}}
|
||||
|
||||
💳 **PIX העתק והדבק נשלח**
|
||||
{{/pixData}}
|
||||
|
||||
whatsapp.to.chatwoot.message.unsupported: |-
|
||||
⚠️ **סוג הודעה זה אינו נתמך ב-ChatWoot.**
|
||||
📱 אנא פתח/י את **WhatsApp** כדי לצפות בזה.
|
||||
|
||||
פרטים: [{{{details.text}}}]({{{details.url}}})
|
||||
|
||||
whatsapp.to.chatwoot.message.facebook.ad: |-
|
||||
📢 **מודעת פייסבוק**
|
||||
|
||||
**כותרת:** {{{adData.title}}}
|
||||
|
||||
**תיאור:**
|
||||
{{{adData.body}}}
|
||||
|
||||
**קישור למודעה:** [לצפייה בפייסבוק]({{{adData.sourceUrl}}})
|
||||
**מזהה המודעה:** {{{adData.sourceId}}}
|
||||
|
||||
---
|
||||
💬 **הודעת הלקוח:**
|
||||
{{{payload.body}}}
|
||||
@@ -1,9 +1,29 @@
|
||||
# Hindi translations for ChatWoot integration
|
||||
locale.name: '🇮🇳 हिंदी (Hindi)'
|
||||
app.inbox.contact.name: 'व्हाट्सएप इंटीग्रेशन (WAHA)'
|
||||
|
||||
# बेस लोकैल कोड - यह एक मान्य BCP 47 लोकैल होना चाहिए
|
||||
# https://en.wikipedia.org/wiki/IETF_language_tag
|
||||
# WAHA इसे संख्याएँ, मुद्रा और दिनांक/समय प्रदर्शित करने के लिए उपयोग करता है।
|
||||
locale.base: 'hi-IN'
|
||||
|
||||
app.inbox.contact.name: 'व्हाट्सएप इंटीग्रेशन'
|
||||
app.inbox.contact.avatar.url: 'https://raw.githubusercontent.com/devlikeapro/waha/core/logo.png'
|
||||
|
||||
job.report.error: |
|
||||
# date.toLocaleString की "options"
|
||||
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options
|
||||
datetime:
|
||||
locales: hi-IN
|
||||
day: 2-digit
|
||||
month: 2-digit
|
||||
year: numeric
|
||||
hour: 2-digit
|
||||
minute: 2-digit
|
||||
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#timezonename
|
||||
timeZoneName: shortGeneric
|
||||
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
# timeZone: 'Asia/Kolkata'
|
||||
|
||||
job.report.error: |-
|
||||
⚠️ **{{{header}}}**
|
||||
{{#attempts.nextDelay}}
|
||||
🔄 {{attempts.nextDelay}} सेकंड में पुनः प्रयास कर रहा है...
|
||||
@@ -20,7 +40,7 @@ job.report.error: |
|
||||
```
|
||||
{{/error}}
|
||||
|
||||
job.report.succeeded: |
|
||||
job.report.succeeded: |-
|
||||
✅ **सफल**
|
||||
प्रयास: {{{attempts.current}}} / {{{attempts.max}}}
|
||||
विवरण: [{{{details.text}}}]({{{details.url}}})
|
||||
@@ -30,33 +50,33 @@ whatsapp.message.receiving.error: व्हाट्सएप से संद
|
||||
whatsapp.message.removing.error: व्हाट्सएप से संदेश हटा नहीं सका
|
||||
job.scheduled.error.header: निर्धारित कार्य निष्पादित करने में विफल रहा
|
||||
|
||||
message.from.whatsapp: |
|
||||
message.from.whatsapp: |-
|
||||
{{{text}}}
|
||||
|
||||
📱 *व्हाट्सएप से भेजा गया*
|
||||
|
||||
message.from.api: |
|
||||
message.from.api: |-
|
||||
{{{text}}}
|
||||
|
||||
📱 *API के माध्यम से भेजा गया*
|
||||
|
||||
message.removed.in.whatsapp: |
|
||||
message.removed.in.whatsapp: |-
|
||||
❌ *यह संदेश व्हाट्सएप में हटा दिया गया था*
|
||||
|
||||
message.edited.in.whatsapp: |
|
||||
message.edited.in.whatsapp: |-
|
||||
{{{text}}}
|
||||
|
||||
✏️ *व्हाट्सएप में संपादित*
|
||||
|
||||
whatsapp.group.message: |
|
||||
{{{text}}}
|
||||
|
||||
whatsapp.group.message: |-
|
||||
👥 *{{{participant}}}*
|
||||
|
||||
whatsapp.reaction.added: |
|
||||
{{{text}}}
|
||||
|
||||
whatsapp.reaction.added: |-
|
||||
*प्रतिक्रिया दी* {{{emoji}}}
|
||||
|
||||
whatsapp.reaction.removed: |
|
||||
whatsapp.reaction.removed: |-
|
||||
*प्रतिक्रिया हटा दी गई*
|
||||
|
||||
whatsapp.contact.group.suffix: 'समूह'
|
||||
@@ -65,7 +85,7 @@ whatsapp.contact.broadcast.suffix: 'प्रसारण सूची'
|
||||
# Aka Stories
|
||||
whatsapp.contact.status.name: 'स्थिति'
|
||||
|
||||
app.connected.message: |
|
||||
app.connected.message: |-
|
||||
🔗 **कनेक्टेड: व्हाट्सएप सत्र से ChatWoot इनबॉक्स**
|
||||
|
||||
✅ व्हाट्सएप सत्र **{{{name}}}** सफलतापूर्वक इस ChatWoot इनबॉक्स से जुड़ गया है।
|
||||
@@ -83,7 +103,7 @@ app.connected.message: |
|
||||
|
||||
चलिए शुरू करते हैं! 🚀
|
||||
|
||||
app.disconnected.message: |
|
||||
app.disconnected.message: |-
|
||||
🔌 **डिस्कनेक्टेड: व्हाट्सएप सत्र से ChatWoot इनबॉक्स**
|
||||
|
||||
❌ व्हाट्सएप सत्र **{{{name}}}** इस ChatWoot इनबॉक्स से डिस्कनेक्ट हो गया है।
|
||||
@@ -92,12 +112,12 @@ app.disconnected.message: |
|
||||
|
||||
फिर से कनेक्ट करने के लिए, कृपया अपने प्रशासक से संपर्क करें।
|
||||
|
||||
app.updated.message: |
|
||||
app.updated.message: |-
|
||||
🔄 **अपडेटेड: व्हाट्सएप सत्र सेटिंग्स**
|
||||
|
||||
✅ व्हाट्सएप सत्र **{{{name}}}** की सेटिंग्स अपडेट की गई हैं।
|
||||
|
||||
app.commands.list: |
|
||||
app.commands.list: |-
|
||||
आप निम्न कमांड में से एक भेजकर **व्हाट्सएप इंटीग्रेशन** का प्रबंधन कर सकते हैं:
|
||||
|
||||
🖥️ **सेशन**:
|
||||
@@ -125,32 +145,32 @@ app.commands.server.disabled: ⛔ **सर्वर कमांड अक्ष
|
||||
|
||||
उपलब्ध कमांड की सूची पाने के लिए **help** भेजें।
|
||||
|
||||
app.help.reminder: |
|
||||
app.help.reminder: |-
|
||||
उपलब्ध कमांड की सूची प्राप्त करने के लिए **help** भेजें।
|
||||
|
||||
app.session.status.change: |
|
||||
app.session.status.change: |-
|
||||
{{{emoji}}} "{{{session}}}" सत्र {{{status}}} स्थिति में बदल गया
|
||||
|
||||
app.session.current.status: |
|
||||
app.session.current.status: |-
|
||||
{{{emoji}}} **{{{session}}}** सत्र की स्थिति **{{{status}}}** में है
|
||||
**व्हाट्सएप खाता:**
|
||||
|
||||
📱 **{{{name}}} ({{{id}}})**
|
||||
|
||||
app.session.status.working: |
|
||||
app.session.status.working: |-
|
||||
✅ यह ChatWoot इनबॉक्स **व्हाट्सएप खाते** से जुड़ा हुआ है और संदेश भेजने और प्राप्त करने के लिए तैयार है!
|
||||
|
||||
📱 **{{{name}}} ({{{id}}})**
|
||||
|
||||
app.session.status.error: |
|
||||
app.session.status.error: |-
|
||||
⚠️ **यह ChatWoot इनबॉक्स व्हाट्सएप खाते से जुड़ा हुआ है लेकिन संदेश भेजने और प्राप्त करने के लिए तैयार नहीं है!**
|
||||
|
||||
कृपया सत्र की स्थिति जांचें और इसे पुनरारंभ करने का प्रयास करें या लॉग आउट करें और QR कोड फिर से स्कैन करें।
|
||||
|
||||
app.session.scan.qr.code: |
|
||||
app.session.scan.qr.code: |-
|
||||
⚠️ **इस ChatWoot इनबॉक्स के साथ व्हाट्सएप खाता जोड़ने के लिए अपने फोन पर QR कोड स्कैन करें!**
|
||||
|
||||
app.server.version.and.status: |
|
||||
app.server.version.and.status: |-
|
||||
**संस्करण:**
|
||||
```
|
||||
{{{version}}}
|
||||
@@ -161,16 +181,16 @@ app.server.version.and.status: |
|
||||
{{{status}}}
|
||||
```
|
||||
|
||||
app.server.reboot: |
|
||||
app.server.reboot: |-
|
||||
सर्वर सुचारू रूप से पुनरारंभ हो रहा है...
|
||||
|
||||
app.server.reboot.force: |
|
||||
app.server.reboot.force: |-
|
||||
सर्वर जबरदस्ती पुनरारंभ हो रहा है...
|
||||
|
||||
app.logout.success: |
|
||||
app.logout.success: |-
|
||||
✅ खाता सफलतापूर्वक अनधिकृत किया गया!
|
||||
|
||||
waha.new.version.available: |
|
||||
waha.new.version.available: |-
|
||||
🔄 **नया संस्करण उपलब्ध!**
|
||||
|
||||
वर्तमान संस्करण: **{{{currentVersion}}}**
|
||||
@@ -178,7 +198,7 @@ waha.new.version.available: |
|
||||
|
||||
👉 [**🆕 चेंजलॉग**]({{{changelogUrl}}}) में क्या नया है देखें
|
||||
|
||||
waha.core.version.used: |
|
||||
waha.core.version.used: |-
|
||||
❤️ **WAHA का समर्थन करें!**
|
||||
|
||||
आप मुफ्त **WAHA Core** संस्करण का उपयोग कर रहे हैं। यदि आपको यह प्रोजेक्ट उपयोगी लगता है, तो कृपया इसके विकास का समर्थन करने पर विचार करें।
|
||||
@@ -187,20 +207,20 @@ waha.core.version.used: |
|
||||
|
||||
[**🎁 हमें समर्थन दें**]({{{supportUrl}}})
|
||||
|
||||
chatwoot.to.whatsapp.message.text: |
|
||||
chatwoot.to.whatsapp.message.text: |-
|
||||
{{{ content }}}
|
||||
|
||||
chatwoot.to.whatsapp.message.media.caption: |
|
||||
chatwoot.to.whatsapp.message.media.caption: |-
|
||||
{{#singleAttachment}}
|
||||
{{#content}}
|
||||
{{{ content }}}
|
||||
{{/content}}
|
||||
{{/singleAttachment}}
|
||||
|
||||
whatsapp.to.chatwoot.message: |
|
||||
whatsapp.to.chatwoot.message: |-
|
||||
{{{payload.body}}}
|
||||
|
||||
whatsapp.to.chatwoot.message.contacts: |
|
||||
whatsapp.to.chatwoot.message.contacts: |-
|
||||
👤 **साझा संपर्क**
|
||||
|
||||
{{#contacts}}
|
||||
@@ -211,12 +231,24 @@ whatsapp.to.chatwoot.message.contacts: |
|
||||
|
||||
{{/contacts}}
|
||||
|
||||
whatsapp.to.chatwoot.message.location: |
|
||||
whatsapp.to.chatwoot.message.location: |-
|
||||
{{#message}}
|
||||
{{#locationMessage}}
|
||||
📍 **साझा स्थान**
|
||||
|
||||
https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#name}}
|
||||
**{{name}}**
|
||||
{{/name}}
|
||||
|
||||
{{#address}}
|
||||
📍 **पता:** {{address}}
|
||||
{{/address}}
|
||||
|
||||
{{#url}}
|
||||
🌐 **वेबसाइट:** {{url}}
|
||||
{{/url}}
|
||||
|
||||
🔗 **मानचित्र पर देखें:** https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#caption}}{{caption}}{{/caption}}
|
||||
{{/locationMessage}}
|
||||
|
||||
@@ -224,13 +256,127 @@ whatsapp.to.chatwoot.message.location: |
|
||||
📍📡 **लाइव लोकेशन साझा की जा रही है**
|
||||
रीयल-टाइम अपडेट देखने के लिए **WhatsApp** खोलें।
|
||||
|
||||
https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#name}}
|
||||
**{{name}}**
|
||||
{{/name}}
|
||||
|
||||
{{#address}}
|
||||
📍 **पता:** {{address}}
|
||||
{{/address}}
|
||||
|
||||
{{#url}}
|
||||
🌐 **वेबसाइट:** {{url}}
|
||||
{{/url}}
|
||||
|
||||
🔗 **मानचित्र पर देखें:** https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#caption}}{{caption}}{{/caption}}
|
||||
{{/liveLocationMessage}}
|
||||
{{/message}}
|
||||
|
||||
whatsapp.to.chatwoot.message.unsupported: |
|
||||
whatsapp.to.chatwoot.message.poll: |-
|
||||
{{#poll}}
|
||||
📊 **मतदान**
|
||||
|
||||
**{{name}}**
|
||||
{{#options}}
|
||||
- {{optionName}}
|
||||
{{/options}}
|
||||
{{/poll}}
|
||||
|
||||
whatsapp.to.chatwoot.message.list: |-
|
||||
{{#message.listMessage}}
|
||||
{{#title}}
|
||||
*{{{title}}}*
|
||||
{{/title}}
|
||||
{{#description}}
|
||||
{{{description}}}
|
||||
{{/description}}
|
||||
{{#footerText}}
|
||||
{{{footerText}}}
|
||||
{{/footerText}}
|
||||
|
||||
{{#buttonText}}
|
||||
{{{buttonText}}}
|
||||
{{/buttonText}}
|
||||
{{#sections}}
|
||||
{{#title}}
|
||||
{{{title}}}:
|
||||
{{/title}}
|
||||
{{#rows}}
|
||||
{{#title}}
|
||||
- {{{title}}}
|
||||
{{/title}}
|
||||
{{/rows}}
|
||||
|
||||
{{/sections}}
|
||||
{{/message.listMessage}}
|
||||
|
||||
whatsapp.to.chatwoot.message.event: |-
|
||||
{{#message}}
|
||||
{{#eventMessage}}
|
||||
📅 **कार्यक्रम**
|
||||
|
||||
**{{name}}**
|
||||
{{#description}}
|
||||
{{description}}
|
||||
{{/description}}
|
||||
|
||||
{{#location.name}}
|
||||
📍 **स्थान:** {{location.name}}
|
||||
{{/location.name}}
|
||||
{{#startTime}}
|
||||
🕐 **आरंभ:** {{startTime}}
|
||||
{{/startTime}}
|
||||
{{#endTime}}
|
||||
🕐 **समाप्ति:** {{endTime}}
|
||||
{{/endTime}}
|
||||
{{#joinLink}}
|
||||
🔗 **जुड़ने का लिंक:** [{{joinLink}}]({{joinLink}})
|
||||
{{/joinLink}}
|
||||
{{/eventMessage}}
|
||||
{{/message}}
|
||||
|
||||
whatsapp.to.chatwoot.message.pix: |-
|
||||
💳 **PIX - कॉपी और पेस्ट**
|
||||
|
||||
{{#pixData}}
|
||||
{{#merchantName}}
|
||||
**{{merchantName}}**
|
||||
{{/merchantName}}
|
||||
|
||||
{{#key}}
|
||||
**PIX कुंजी:** {{key}}
|
||||
{{/key}}
|
||||
{{#keyType}}
|
||||
**प्रकार:** {{keyType}}
|
||||
{{/keyType}}
|
||||
{{#totalAmount}}
|
||||
**राशि:** {{totalAmountFormatted}}
|
||||
{{/totalAmount}}
|
||||
{{#referenceId}}
|
||||
**संदर्भ:** {{referenceId}}
|
||||
{{/referenceId}}
|
||||
|
||||
💳 **PIX कॉपी और पेस्ट भेजा गया**
|
||||
{{/pixData}}
|
||||
|
||||
whatsapp.to.chatwoot.message.unsupported: |-
|
||||
⚠️ **इस प्रकार का संदेश ChatWoot में समर्थित नहीं है।**
|
||||
📱 इसे देखने के लिए कृपया **WhatsApp** खोलें।
|
||||
|
||||
विवरण: [{{{details.text}}}]({{{details.url}}})
|
||||
|
||||
whatsapp.to.chatwoot.message.facebook.ad: |-
|
||||
📢 **फेसबुक विज्ञापन**
|
||||
|
||||
**शीर्षक:** {{{adData.title}}}
|
||||
|
||||
**विवरण:**
|
||||
{{{adData.body}}}
|
||||
|
||||
**विज्ञापन लिंक:** [फेसबुक पर देखें]({{{adData.sourceUrl}}})
|
||||
**विज्ञापन आईडी:** {{{adData.sourceId}}}
|
||||
|
||||
---
|
||||
💬 **ग्राहक संदेश:**
|
||||
{{{payload.body}}}
|
||||
@@ -1,9 +1,29 @@
|
||||
# Indonesian translations for ChatWoot integration
|
||||
locale.name: '🇮🇩 Bahasa Indonesia (Indonesian)'
|
||||
app.inbox.contact.name: 'Integrasi WhatsApp (WAHA)'
|
||||
|
||||
# Kode locale dasar - harus berupa locale BCP 47 yang valid
|
||||
# https://en.wikipedia.org/wiki/IETF_language_tag
|
||||
# WAHA menggunakannya untuk format angka, mata uang, dan tanggal/waktu
|
||||
locale.base: 'id-ID'
|
||||
|
||||
app.inbox.contact.name: 'Integrasi WhatsApp'
|
||||
app.inbox.contact.avatar.url: 'https://raw.githubusercontent.com/devlikeapro/waha/core/logo.png'
|
||||
|
||||
job.report.error: |
|
||||
# "opsi" dari date.toLocaleString
|
||||
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options
|
||||
datetime:
|
||||
locales: id-ID
|
||||
day: 2-digit
|
||||
month: 2-digit
|
||||
year: numeric
|
||||
hour: 2-digit
|
||||
minute: 2-digit
|
||||
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#timezonename
|
||||
timeZoneName: shortGeneric
|
||||
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
# timeZone: 'Asia/Jakarta'
|
||||
|
||||
job.report.error: |-
|
||||
⚠️ **{{{header}}}**
|
||||
{{#attempts.nextDelay}}
|
||||
🔄 Mencoba lagi dalam {{attempts.nextDelay}} detik...
|
||||
@@ -20,7 +40,7 @@ job.report.error: |
|
||||
```
|
||||
{{/error}}
|
||||
|
||||
job.report.succeeded: |
|
||||
job.report.succeeded: |-
|
||||
✅ **Berhasil**
|
||||
Percobaan: {{{attempts.current}}} / {{{attempts.max}}}
|
||||
Detail: [{{{details.text}}}]({{{details.url}}})
|
||||
@@ -30,33 +50,33 @@ whatsapp.message.receiving.error: Tidak dapat menerima pesan dari WhatsApp
|
||||
whatsapp.message.removing.error: Tidak dapat menghapus pesan dari WhatsApp
|
||||
job.scheduled.error.header: Tugas terjadwal gagal dijalankan
|
||||
|
||||
message.from.whatsapp: |
|
||||
message.from.whatsapp: |-
|
||||
{{{text}}}
|
||||
|
||||
📱 *Dikirim dari WhatsApp*
|
||||
|
||||
message.from.api: |
|
||||
message.from.api: |-
|
||||
{{{text}}}
|
||||
|
||||
📱 *Dikirim melalui API*
|
||||
|
||||
message.removed.in.whatsapp: |
|
||||
message.removed.in.whatsapp: |-
|
||||
❌ *Pesan ini telah dihapus di WhatsApp*
|
||||
|
||||
message.edited.in.whatsapp: |
|
||||
message.edited.in.whatsapp: |-
|
||||
{{{text}}}
|
||||
|
||||
✏️ *Diedit di WhatsApp*
|
||||
|
||||
whatsapp.group.message: |
|
||||
{{{text}}}
|
||||
|
||||
whatsapp.group.message: |-
|
||||
👥 *{{{participant}}}*
|
||||
|
||||
whatsapp.reaction.added: |
|
||||
{{{text}}}
|
||||
|
||||
whatsapp.reaction.added: |-
|
||||
*Bereaksi* {{{emoji}}}
|
||||
|
||||
whatsapp.reaction.removed: |
|
||||
whatsapp.reaction.removed: |-
|
||||
*Reaksi dihapus*
|
||||
|
||||
whatsapp.contact.group.suffix: 'Grup'
|
||||
@@ -65,7 +85,7 @@ whatsapp.contact.broadcast.suffix: 'Daftar Siaran'
|
||||
# Aka Stories
|
||||
whatsapp.contact.status.name: 'Status'
|
||||
|
||||
app.connected.message: |
|
||||
app.connected.message: |-
|
||||
🔗 **TERHUBUNG: Sesi WhatsApp ke Kotak Masuk ChatWoot**
|
||||
|
||||
✅ Sesi WhatsApp **{{{name}}}** telah berhasil terhubung ke Kotak Masuk ChatWoot ini.
|
||||
@@ -83,7 +103,7 @@ app.connected.message: |
|
||||
|
||||
Mari kita mulai! 🚀
|
||||
|
||||
app.disconnected.message: |
|
||||
app.disconnected.message: |-
|
||||
🔌 **TERPUTUS: Sesi WhatsApp dari Kotak Masuk ChatWoot**
|
||||
|
||||
❌ Sesi WhatsApp **{{{name}}}** telah terputus dari Kotak Masuk ChatWoot ini.
|
||||
@@ -92,12 +112,12 @@ app.disconnected.message: |
|
||||
|
||||
Untuk menghubungkan kembali, silakan hubungi administrator Anda.
|
||||
|
||||
app.updated.message: |
|
||||
app.updated.message: |-
|
||||
🔄 **DIPERBARUI: Pengaturan Sesi WhatsApp**
|
||||
|
||||
✅ Pengaturan untuk sesi WhatsApp **{{{name}}}** telah diperbarui.
|
||||
|
||||
app.commands.list: |
|
||||
app.commands.list: |-
|
||||
Anda dapat mengelola **Integrasi WhatsApp** dengan mengirimkan salah satu perintah berikut:
|
||||
|
||||
🖥️ **Sesi**:
|
||||
@@ -125,32 +145,32 @@ app.commands.server.disabled: ⛔ **Perintah server dinonaktifkan**.
|
||||
|
||||
Kirim **help** untuk melihat daftar perintah yang tersedia.
|
||||
|
||||
app.help.reminder: |
|
||||
app.help.reminder: |-
|
||||
Kirim **help** untuk mendapatkan daftar perintah yang tersedia.
|
||||
|
||||
app.session.status.change: |
|
||||
app.session.status.change: |-
|
||||
{{{emoji}}} Sesi "{{{session}}}" beralih ke status {{{status}}}
|
||||
|
||||
app.session.current.status: |
|
||||
app.session.current.status: |-
|
||||
{{{emoji}}} Status sesi **{{{session}}}** adalah **{{{status}}}**
|
||||
**Akun WhatsApp:**
|
||||
|
||||
📱 **{{{name}}} ({{{id}}})**
|
||||
|
||||
app.session.status.working: |
|
||||
app.session.status.working: |-
|
||||
✅ Kotak Masuk ChatWoot ini terhubung ke **Akun WhatsApp** dan siap untuk mengirim dan menerima pesan!
|
||||
|
||||
📱 **{{{name}}} ({{{id}}})**
|
||||
|
||||
app.session.status.error: |
|
||||
app.session.status.error: |-
|
||||
⚠️ **Kotak Masuk ChatWoot ini terhubung ke Akun WhatsApp tetapi TIDAK siap untuk mengirim dan menerima pesan!**
|
||||
|
||||
Silakan periksa status sesi dan coba mulai ulang atau keluar dan pindai kode QR lagi.
|
||||
|
||||
app.session.scan.qr.code: |
|
||||
app.session.scan.qr.code: |-
|
||||
⚠️ **Pindai kode QR di ponsel Anda untuk menghubungkan Akun WhatsApp dengan Kotak Masuk ChatWoot ini!**
|
||||
|
||||
app.server.version.and.status: |
|
||||
app.server.version.and.status: |-
|
||||
**Versi:**
|
||||
```
|
||||
{{{version}}}
|
||||
@@ -161,16 +181,16 @@ app.server.version.and.status: |
|
||||
{{{status}}}
|
||||
```
|
||||
|
||||
app.server.reboot: |
|
||||
app.server.reboot: |-
|
||||
Server sedang dimulai ulang dengan anggun...
|
||||
|
||||
app.server.reboot.force: |
|
||||
app.server.reboot.force: |-
|
||||
Server sedang dipaksa untuk dimulai ulang...
|
||||
|
||||
app.logout.success: |
|
||||
app.logout.success: |-
|
||||
✅ Akun berhasil tidak diotorisasi!
|
||||
|
||||
waha.new.version.available: |
|
||||
waha.new.version.available: |-
|
||||
🔄 **Versi Baru Tersedia!**
|
||||
|
||||
Versi saat ini: **{{{currentVersion}}}**
|
||||
@@ -178,7 +198,7 @@ waha.new.version.available: |
|
||||
|
||||
👉 Lihat apa yang baru di [**🆕 Changelog**]({{{changelogUrl}}})
|
||||
|
||||
waha.core.version.used: |
|
||||
waha.core.version.used: |-
|
||||
❤️ **Dukung WAHA!**
|
||||
|
||||
Anda menggunakan versi **WAHA Core** gratis. Jika Anda merasa proyek ini bermanfaat, harap pertimbangkan untuk mendukung pengembangannya.
|
||||
@@ -187,20 +207,20 @@ waha.core.version.used: |
|
||||
|
||||
[**🎁 Dukung Kami**]({{{supportUrl}}})
|
||||
|
||||
chatwoot.to.whatsapp.message.text: |
|
||||
chatwoot.to.whatsapp.message.text: |-
|
||||
{{{ content }}}
|
||||
|
||||
chatwoot.to.whatsapp.message.media.caption: |
|
||||
chatwoot.to.whatsapp.message.media.caption: |-
|
||||
{{#singleAttachment}}
|
||||
{{#content}}
|
||||
{{{ content }}}
|
||||
{{/content}}
|
||||
{{/singleAttachment}}
|
||||
|
||||
whatsapp.to.chatwoot.message: |
|
||||
whatsapp.to.chatwoot.message: |-
|
||||
{{{payload.body}}}
|
||||
|
||||
whatsapp.to.chatwoot.message.contacts: |
|
||||
whatsapp.to.chatwoot.message.contacts: |-
|
||||
👤 **Kontak yang dibagikan**
|
||||
|
||||
{{#contacts}}
|
||||
@@ -211,12 +231,24 @@ whatsapp.to.chatwoot.message.contacts: |
|
||||
|
||||
{{/contacts}}
|
||||
|
||||
whatsapp.to.chatwoot.message.location: |
|
||||
whatsapp.to.chatwoot.message.location: |-
|
||||
{{#message}}
|
||||
{{#locationMessage}}
|
||||
📍 **Lokasi yang dibagikan**
|
||||
|
||||
https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#name}}
|
||||
**{{name}}**
|
||||
{{/name}}
|
||||
|
||||
{{#address}}
|
||||
📍 **Alamat:** {{address}}
|
||||
{{/address}}
|
||||
|
||||
{{#url}}
|
||||
🌐 **Situs web:** {{url}}
|
||||
{{/url}}
|
||||
|
||||
🔗 **Lihat di peta:** https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#caption}}{{caption}}{{/caption}}
|
||||
{{/locationMessage}}
|
||||
|
||||
@@ -224,13 +256,127 @@ whatsapp.to.chatwoot.message.location: |
|
||||
📍📡 **Berbagi Lokasi Langsung**
|
||||
Buka **WhatsApp** untuk melihat pembaruan waktu nyata.
|
||||
|
||||
https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#name}}
|
||||
**{{name}}**
|
||||
{{/name}}
|
||||
|
||||
{{#address}}
|
||||
📍 **Alamat:** {{address}}
|
||||
{{/address}}
|
||||
|
||||
{{#url}}
|
||||
🌐 **Situs web:** {{url}}
|
||||
{{/url}}
|
||||
|
||||
🔗 **Lihat di peta:** https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#caption}}{{caption}}{{/caption}}
|
||||
{{/liveLocationMessage}}
|
||||
{{/message}}
|
||||
|
||||
whatsapp.to.chatwoot.message.unsupported: |
|
||||
whatsapp.to.chatwoot.message.poll: |-
|
||||
{{#poll}}
|
||||
📊 **Jajak Pendapat**
|
||||
|
||||
**{{name}}**
|
||||
{{#options}}
|
||||
- {{optionName}}
|
||||
{{/options}}
|
||||
{{/poll}}
|
||||
|
||||
whatsapp.to.chatwoot.message.list: |-
|
||||
{{#message.listMessage}}
|
||||
{{#title}}
|
||||
*{{{title}}}*
|
||||
{{/title}}
|
||||
{{#description}}
|
||||
{{{description}}}
|
||||
{{/description}}
|
||||
{{#footerText}}
|
||||
{{{footerText}}}
|
||||
{{/footerText}}
|
||||
|
||||
{{#buttonText}}
|
||||
{{{buttonText}}}
|
||||
{{/buttonText}}
|
||||
{{#sections}}
|
||||
{{#title}}
|
||||
{{{title}}}:
|
||||
{{/title}}
|
||||
{{#rows}}
|
||||
{{#title}}
|
||||
- {{{title}}}
|
||||
{{/title}}
|
||||
{{/rows}}
|
||||
|
||||
{{/sections}}
|
||||
{{/message.listMessage}}
|
||||
|
||||
whatsapp.to.chatwoot.message.event: |-
|
||||
{{#message}}
|
||||
{{#eventMessage}}
|
||||
📅 **Acara**
|
||||
|
||||
**{{name}}**
|
||||
{{#description}}
|
||||
{{description}}
|
||||
{{/description}}
|
||||
|
||||
{{#location.name}}
|
||||
📍 **Lokasi:** {{location.name}}
|
||||
{{/location.name}}
|
||||
{{#startTime}}
|
||||
🕐 **Mulai:** {{startTime}}
|
||||
{{/startTime}}
|
||||
{{#endTime}}
|
||||
🕐 **Selesai:** {{endTime}}
|
||||
{{/endTime}}
|
||||
{{#joinLink}}
|
||||
🔗 **Tautan bergabung:** [{{joinLink}}]({{joinLink}})
|
||||
{{/joinLink}}
|
||||
{{/eventMessage}}
|
||||
{{/message}}
|
||||
|
||||
whatsapp.to.chatwoot.message.pix: |-
|
||||
💳 **PIX - Salin dan Tempel**
|
||||
|
||||
{{#pixData}}
|
||||
{{#merchantName}}
|
||||
**{{merchantName}}**
|
||||
{{/merchantName}}
|
||||
|
||||
{{#key}}
|
||||
**Kunci PIX:** {{key}}
|
||||
{{/key}}
|
||||
{{#keyType}}
|
||||
**Jenis:** {{keyType}}
|
||||
{{/keyType}}
|
||||
{{#totalAmount}}
|
||||
**Jumlah:** {{totalAmountFormatted}}
|
||||
{{/totalAmount}}
|
||||
{{#referenceId}}
|
||||
**Referensi:** {{referenceId}}
|
||||
{{/referenceId}}
|
||||
|
||||
💳 **PIX Salin dan Tempel terkirim**
|
||||
{{/pixData}}
|
||||
|
||||
whatsapp.to.chatwoot.message.unsupported: |-
|
||||
⚠️ **Jenis pesan ini tidak didukung di ChatWoot.**
|
||||
📱 Silakan buka **WhatsApp** untuk melihatnya.
|
||||
|
||||
Detail: [{{{details.text}}}]({{{details.url}}})
|
||||
|
||||
whatsapp.to.chatwoot.message.facebook.ad: |-
|
||||
📢 **IKLAN FACEBOOK**
|
||||
|
||||
**Judul:** {{{adData.title}}}
|
||||
|
||||
**Deskripsi:**
|
||||
{{{adData.body}}}
|
||||
|
||||
**Tautan Iklan:** [Lihat di Facebook]({{{adData.sourceUrl}}})
|
||||
**ID Iklan:** {{{adData.sourceId}}}
|
||||
|
||||
---
|
||||
💬 **Pesan Pelanggan:**
|
||||
{{{payload.body}}}
|
||||
@@ -1,9 +1,29 @@
|
||||
# Punjabi translations for ChatWoot integration
|
||||
locale.name: '🇵🇰 ਪੰਜਾਬੀ (Punjabi)'
|
||||
app.inbox.contact.name: 'ਵਟਸਐਪ ਇੰਟੀਗ੍ਰੇਸ਼ਨ (WAHA)'
|
||||
|
||||
# ਅਧਾਰਭੂਤ ਲੋਕੇਲ ਕੋਡ - ਇਹ ਇੱਕ ਵੈਧ BCP 47 ਲੋਕੇਲ ਹੋਣਾ ਚਾਹੀਦਾ ਹੈ
|
||||
# https://en.wikipedia.org/wiki/IETF_language_tag
|
||||
# WAHA ਇਸਨੂੰ ਅੰਕ, ਕਰੰਸੀ ਅਤੇ ਤਾਰੀਖ/ਸਮੇਂ ਦੀ ਨਮਾਇਸ਼ ਲਈ ਵਰਤਦਾ ਹੈ
|
||||
locale.base: 'pa-PK'
|
||||
|
||||
app.inbox.contact.name: 'ਵਟਸਐਪ ਇੰਟੀਗ੍ਰੇਸ਼ਨ'
|
||||
app.inbox.contact.avatar.url: 'https://raw.githubusercontent.com/devlikeapro/waha/core/logo.png'
|
||||
|
||||
job.report.error: |
|
||||
# date.toLocaleString ਦੀਆਂ "options"
|
||||
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options
|
||||
datetime:
|
||||
locales: pa-PK
|
||||
day: 2-digit
|
||||
month: 2-digit
|
||||
year: numeric
|
||||
hour: 2-digit
|
||||
minute: 2-digit
|
||||
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#timezonename
|
||||
timeZoneName: shortGeneric
|
||||
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
# timeZone: 'Asia/Karachi'
|
||||
|
||||
job.report.error: |-
|
||||
⚠️ **{{{header}}}**
|
||||
{{#attempts.nextDelay}}
|
||||
🔄 {{attempts.nextDelay}} ਸਕਿੰਟਾਂ ਵਿੱਚ ਦੁਬਾਰਾ ਕੋਸ਼ਿਸ਼ ਕਰ ਰਿਹਾ ਹੈ...
|
||||
@@ -20,7 +40,7 @@ job.report.error: |
|
||||
```
|
||||
{{/error}}
|
||||
|
||||
job.report.succeeded: |
|
||||
job.report.succeeded: |-
|
||||
✅ **ਸਫਲ**
|
||||
ਕੋਸ਼ਿਸ਼: {{{attempts.current}}} / {{{attempts.max}}}
|
||||
ਵੇਰਵੇ: [{{{details.text}}}]({{{details.url}}})
|
||||
@@ -30,33 +50,33 @@ whatsapp.message.receiving.error: ਵਟਸਐਪ ਤੋਂ ਸੁਨੇਹਾ
|
||||
whatsapp.message.removing.error: ਵਟਸਐਪ ਤੋਂ ਸੁਨੇਹਾ ਹਟਾ ਨਹੀਂ ਸਕਿਆ
|
||||
job.scheduled.error.header: ਨਿਰਧਾਰਿਤ ਕੰਮ ਚਲਾਉਣ ਵਿੱਚ ਅਸਫਲ ਰਿਹਾ
|
||||
|
||||
message.from.whatsapp: |
|
||||
message.from.whatsapp: |-
|
||||
{{{text}}}
|
||||
|
||||
📱 *ਵਟਸਐਪ ਤੋਂ ਭੇਜਿਆ ਗਿਆ*
|
||||
|
||||
message.from.api: |
|
||||
message.from.api: |-
|
||||
{{{text}}}
|
||||
|
||||
📱 *API ਰਾਹੀਂ ਭੇਜਿਆ ਗਿਆ*
|
||||
|
||||
message.removed.in.whatsapp: |
|
||||
message.removed.in.whatsapp: |-
|
||||
❌ *ਇਹ ਸੁਨੇਹਾ ਵਟਸਐਪ ਵਿੱਚ ਮਿਟਾ ਦਿੱਤਾ ਗਿਆ ਸੀ*
|
||||
|
||||
message.edited.in.whatsapp: |
|
||||
message.edited.in.whatsapp: |-
|
||||
{{{text}}}
|
||||
|
||||
✏️ *ਵਟਸਐਪ ਵਿੱਚ ਸੰਪਾਦਿਤ ਕੀਤਾ ਗਿਆ*
|
||||
|
||||
whatsapp.group.message: |
|
||||
{{{text}}}
|
||||
|
||||
whatsapp.group.message: |-
|
||||
👥 *{{{participant}}}*
|
||||
|
||||
whatsapp.reaction.added: |
|
||||
{{{text}}}
|
||||
|
||||
whatsapp.reaction.added: |-
|
||||
*ਪ੍ਰਤੀਕਿਰਿਆ ਕੀਤੀ* {{{emoji}}}
|
||||
|
||||
whatsapp.reaction.removed: |
|
||||
whatsapp.reaction.removed: |-
|
||||
*ਪ੍ਰਤੀਕਿਰਿਆ ਹਟਾਈ ਗਈ*
|
||||
|
||||
whatsapp.contact.group.suffix: 'ਗਰੁੱਪ'
|
||||
@@ -65,7 +85,7 @@ whatsapp.contact.broadcast.suffix: 'ਪ੍ਰਸਾਰਣ ਸੂਚੀ'
|
||||
# Aka Stories
|
||||
whatsapp.contact.status.name: 'ਸਥਿਤੀ'
|
||||
|
||||
app.connected.message: |
|
||||
app.connected.message: |-
|
||||
🔗 **ਕਨੈਕਟ ਕੀਤਾ: ਵਟਸਐਪ ਸੈਸ਼ਨ ਤੋਂ ChatWoot ਇਨਬਾਕਸ**
|
||||
|
||||
✅ ਵਟਸਐਪ ਸੈਸ਼ਨ **{{{name}}}** ਨੂੰ ਸਫਲਤਾਪੂਰਵਕ ਇਸ ChatWoot ਇਨਬਾਕਸ ਨਾਲ ਜੋੜਿਆ ਗਿਆ ਹੈ।
|
||||
@@ -83,7 +103,7 @@ app.connected.message: |
|
||||
|
||||
ਆਓ ਸ਼ੁਰੂ ਕਰੀਏ! 🚀
|
||||
|
||||
app.disconnected.message: |
|
||||
app.disconnected.message: |-
|
||||
🔌 **ਡਿਸਕਨੈਕਟ ਕੀਤਾ: ਵਟਸਐਪ ਸੈਸ਼ਨ ਤੋਂ ChatWoot ਇਨਬਾਕਸ**
|
||||
|
||||
❌ ਵਟਸਐਪ ਸੈਸ਼ਨ **{{{name}}}** ਇਸ ChatWoot ਇਨਬਾਕਸ ਤੋਂ ਡਿਸਕਨੈਕਟ ਕੀਤਾ ਗਿਆ ਹੈ।
|
||||
@@ -92,12 +112,12 @@ app.disconnected.message: |
|
||||
|
||||
ਮੁੜ ਕਨੈਕਟ ਕਰਨ ਲਈ, ਕਿਰਪਾ ਕਰਕੇ ਆਪਣੇ ਪ੍ਰਸ਼ਾਸਕ ਨਾਲ ਸੰਪਰਕ ਕਰੋ।
|
||||
|
||||
app.updated.message: |
|
||||
app.updated.message: |-
|
||||
🔄 **ਅਪਡੇਟ ਕੀਤਾ: ਵਟਸਐਪ ਸੈਸ਼ਨ ਸੈਟਿੰਗਾਂ**
|
||||
|
||||
✅ ਵਟਸਐਪ ਸੈਸ਼ਨ **{{{name}}}** ਲਈ ਸੈਟਿੰਗਾਂ ਅਪਡੇਟ ਕੀਤੀਆਂ ਗਈਆਂ ਹਨ।
|
||||
|
||||
app.commands.list: |
|
||||
app.commands.list: |-
|
||||
ਤੁਸੀਂ ਹੇਠਾਂ ਦਿੱਤੇ ਕਮਾਂਡਾਂ ਵਿੱਚੋਂ ਇੱਕ ਭੇਜ ਕੇ **ਵਟਸਐਪ ਇੰਟੀਗ੍ਰੇਸ਼ਨ** ਦਾ ਪ੍ਰਬੰਧਨ ਕਰ ਸਕਦੇ ਹੋ:
|
||||
|
||||
🖥️ **ਸੈਸ਼ਨ**:
|
||||
@@ -125,32 +145,32 @@ app.commands.server.disabled: ⛔ **ਸਰਵਰ ਕਮਾਂਡ ਅਯੋਗ
|
||||
|
||||
ਉਪਲਬਧ ਕਮਾਂਡਾਂ ਦੀ ਸੂਚੀ ਲਈ **help** ਭੇਜੋ।
|
||||
|
||||
app.help.reminder: |
|
||||
app.help.reminder: |-
|
||||
ਉਪਲਬਧ ਕਮਾਂਡਾਂ ਦੀ ਸੂਚੀ ਪ੍ਰਾਪਤ ਕਰਨ ਲਈ **help** ਭੇਜੋ।
|
||||
|
||||
app.session.status.change: |
|
||||
app.session.status.change: |-
|
||||
{{{emoji}}} "{{{session}}}" ਸੈਸ਼ਨ {{{status}}} ਸਥਿਤੀ 'ਤੇ ਬਦਲ ਗਿਆ
|
||||
|
||||
app.session.current.status: |
|
||||
app.session.current.status: |-
|
||||
{{{emoji}}} **{{{session}}}** ਸੈਸ਼ਨ ਸਥਿਤੀ **{{{status}}}** ਵਿੱਚ ਹੈ
|
||||
**ਵਟਸਐਪ ਖਾਤਾ:**
|
||||
|
||||
📱 **{{{name}}} ({{{id}}})**
|
||||
|
||||
app.session.status.working: |
|
||||
app.session.status.working: |-
|
||||
✅ ਇਹ ChatWoot ਇਨਬਾਕਸ **ਵਟਸਐਪ ਖਾਤੇ** ਨਾਲ ਜੁੜਿਆ ਹੋਇਆ ਹੈ ਅਤੇ ਸੁਨੇਹੇ ਭੇਜਣ ਅਤੇ ਪ੍ਰਾਪਤ ਕਰਨ ਲਈ ਤਿਆਰ ਹੈ!
|
||||
|
||||
📱 **{{{name}}} ({{{id}}})**
|
||||
|
||||
app.session.status.error: |
|
||||
app.session.status.error: |-
|
||||
⚠️ **ਇਹ ChatWoot ਇਨਬਾਕਸ ਵਟਸਐਪ ਖਾਤੇ ਨਾਲ ਜੁੜਿਆ ਹੋਇਆ ਹੈ ਪਰ ਸੁਨੇਹੇ ਭੇਜਣ ਅਤੇ ਪ੍ਰਾਪਤ ਕਰਨ ਲਈ ਤਿਆਰ ਨਹੀਂ ਹੈ!**
|
||||
|
||||
ਕਿਰਪਾ ਕਰਕੇ ਸੈਸ਼ਨ ਸਥਿਤੀ ਦੀ ਜਾਂਚ ਕਰੋ ਅਤੇ ਇਸਨੂੰ ਮੁੜ ਚਾਲੂ ਕਰਨ ਦੀ ਕੋਸ਼ਿਸ਼ ਕਰੋ ਜਾਂ ਲੌਗਆਉਟ ਕਰੋ ਅਤੇ QR ਕੋਡ ਦੁਬਾਰਾ ਸਕੈਨ ਕਰੋ।
|
||||
|
||||
app.session.scan.qr.code: |
|
||||
app.session.scan.qr.code: |-
|
||||
⚠️ **ਵਟਸਐਪ ਖਾਤੇ ਨੂੰ ਇਸ ChatWoot ਇਨਬਾਕਸ ਨਾਲ ਜੋੜਨ ਲਈ ਆਪਣੇ ਫੋਨ 'ਤੇ QR ਕੋਡ ਸਕੈਨ ਕਰੋ!**
|
||||
|
||||
app.server.version.and.status: |
|
||||
app.server.version.and.status: |-
|
||||
**ਵਰਜਨ:**
|
||||
```
|
||||
{{{version}}}
|
||||
@@ -161,16 +181,16 @@ app.server.version.and.status: |
|
||||
{{{status}}}
|
||||
```
|
||||
|
||||
app.server.reboot: |
|
||||
app.server.reboot: |-
|
||||
ਸਰਵਰ ਸੁਚਾਰੂ ਢੰਗ ਨਾਲ ਮੁੜ ਚਾਲੂ ਹੋ ਰਿਹਾ ਹੈ...
|
||||
|
||||
app.server.reboot.force: |
|
||||
app.server.reboot.force: |-
|
||||
ਸਰਵਰ ਜ਼ਬਰਦਸਤੀ ਮੁੜ ਚਾਲੂ ਹੋ ਰਿਹਾ ਹੈ...
|
||||
|
||||
app.logout.success: |
|
||||
app.logout.success: |-
|
||||
✅ ਖਾਤਾ ਸਫਲਤਾਪੂਰਵਕ ਅਣਅਧਿਕਾਰਤ ਕੀਤਾ ਗਿਆ!
|
||||
|
||||
waha.new.version.available: |
|
||||
waha.new.version.available: |-
|
||||
🔄 **ਨਵਾਂ ਵਰਜਨ ਉਪਲਬਧ!**
|
||||
|
||||
ਮੌਜੂਦਾ ਵਰਜਨ: **{{{currentVersion}}}**
|
||||
@@ -178,7 +198,7 @@ waha.new.version.available: |
|
||||
|
||||
👉 [**🆕 ਬਦਲਾਅ ਲੌਗ**]({{{changelogUrl}}}) ਵਿੱਚ ਨਵਾਂ ਕੀ ਹੈ ਦੇਖੋ
|
||||
|
||||
waha.core.version.used: |
|
||||
waha.core.version.used: |-
|
||||
❤️ **WAHA ਦਾ ਸਮਰਥਨ ਕਰੋ!**
|
||||
|
||||
ਤੁਸੀਂ ਮੁਫਤ **WAHA Core** ਵਰਜਨ ਦੀ ਵਰਤੋਂ ਕਰ ਰਹੇ ਹੋ। ਜੇ ਤੁਹਾਨੂੰ ਇਹ ਪ੍ਰੋਜੈਕਟ ਲਾਭਦਾਇਕ ਲੱਗਦਾ ਹੈ, ਤਾਂ ਕਿਰਪਾ ਕਰਕੇ ਇਸਦੇ ਵਿਕਾਸ ਦਾ ਸਮਰਥਨ ਕਰਨ 'ਤੇ ਵਿਚਾਰ ਕਰੋ।
|
||||
@@ -187,20 +207,20 @@ waha.core.version.used: |
|
||||
|
||||
[**🎁 ਸਾਡਾ ਸਮਰਥਨ ਕਰੋ**]({{{supportUrl}}})
|
||||
|
||||
chatwoot.to.whatsapp.message.text: |
|
||||
chatwoot.to.whatsapp.message.text: |-
|
||||
{{{ content }}}
|
||||
|
||||
chatwoot.to.whatsapp.message.media.caption: |
|
||||
chatwoot.to.whatsapp.message.media.caption: |-
|
||||
{{#singleAttachment}}
|
||||
{{#content}}
|
||||
{{{ content }}}
|
||||
{{/content}}
|
||||
{{/singleAttachment}}
|
||||
|
||||
whatsapp.to.chatwoot.message: |
|
||||
whatsapp.to.chatwoot.message: |-
|
||||
{{{payload.body}}}
|
||||
|
||||
whatsapp.to.chatwoot.message.contacts: |
|
||||
whatsapp.to.chatwoot.message.contacts: |-
|
||||
👤 **ਸਾਂਝੇ ਕੀਤੇ ਸੰਪਰਕ**
|
||||
|
||||
{{#contacts}}
|
||||
@@ -211,12 +231,24 @@ whatsapp.to.chatwoot.message.contacts: |
|
||||
|
||||
{{/contacts}}
|
||||
|
||||
whatsapp.to.chatwoot.message.location: |
|
||||
whatsapp.to.chatwoot.message.location: |-
|
||||
{{#message}}
|
||||
{{#locationMessage}}
|
||||
📍 **ਸਾਂਝੀ ਸਥਿਤੀ**
|
||||
|
||||
https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#name}}
|
||||
**{{name}}**
|
||||
{{/name}}
|
||||
|
||||
{{#address}}
|
||||
📍 **ਪਤਾ:** {{address}}
|
||||
{{/address}}
|
||||
|
||||
{{#url}}
|
||||
🌐 **ਵੈਬਸਾਈਟ:** {{url}}
|
||||
{{/url}}
|
||||
|
||||
🔗 **ਨਕਸ਼ੇ 'ਤੇ ਵੇਖੋ:** https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#caption}}{{caption}}{{/caption}}
|
||||
{{/locationMessage}}
|
||||
|
||||
@@ -224,13 +256,127 @@ whatsapp.to.chatwoot.message.location: |
|
||||
📍📡 **ਲਾਈਵ ਸਥਿਤੀ ਸਾਂਝੀ ਕੀਤੀ ਜਾ ਰਹੀ ਹੈ**
|
||||
ਰੀਅਲ-ਟਾਈਮ ਅੱਪਡੇਟ ਦੇਖਣ ਲਈ **WhatsApp** ਖੋਲ੍ਹੋ।
|
||||
|
||||
https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#name}}
|
||||
**{{name}}**
|
||||
{{/name}}
|
||||
|
||||
{{#address}}
|
||||
📍 **ਪਤਾ:** {{address}}
|
||||
{{/address}}
|
||||
|
||||
{{#url}}
|
||||
🌐 **ਵੈਬਸਾਈਟ:** {{url}}
|
||||
{{/url}}
|
||||
|
||||
🔗 **ਨਕਸ਼ੇ 'ਤੇ ਵੇਖੋ:** https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#caption}}{{caption}}{{/caption}}
|
||||
{{/liveLocationMessage}}
|
||||
{{/message}}
|
||||
|
||||
whatsapp.to.chatwoot.message.unsupported: |
|
||||
whatsapp.to.chatwoot.message.poll: |-
|
||||
{{#poll}}
|
||||
📊 **ਸਰਵੇਖਣ**
|
||||
|
||||
**{{name}}**
|
||||
{{#options}}
|
||||
- {{optionName}}
|
||||
{{/options}}
|
||||
{{/poll}}
|
||||
|
||||
whatsapp.to.chatwoot.message.list: |-
|
||||
{{#message.listMessage}}
|
||||
{{#title}}
|
||||
*{{{title}}}*
|
||||
{{/title}}
|
||||
{{#description}}
|
||||
{{{description}}}
|
||||
{{/description}}
|
||||
{{#footerText}}
|
||||
{{{footerText}}}
|
||||
{{/footerText}}
|
||||
|
||||
{{#buttonText}}
|
||||
{{{buttonText}}}
|
||||
{{/buttonText}}
|
||||
{{#sections}}
|
||||
{{#title}}
|
||||
{{{title}}}:
|
||||
{{/title}}
|
||||
{{#rows}}
|
||||
{{#title}}
|
||||
- {{{title}}}
|
||||
{{/title}}
|
||||
{{/rows}}
|
||||
|
||||
{{/sections}}
|
||||
{{/message.listMessage}}
|
||||
|
||||
whatsapp.to.chatwoot.message.event: |-
|
||||
{{#message}}
|
||||
{{#eventMessage}}
|
||||
📅 **ਇਵੈਂਟ**
|
||||
|
||||
**{{name}}**
|
||||
{{#description}}
|
||||
{{description}}
|
||||
{{/description}}
|
||||
|
||||
{{#location.name}}
|
||||
📍 **ਸਥਾਨ:** {{location.name}}
|
||||
{{/location.name}}
|
||||
{{#startTime}}
|
||||
🕐 **ਸ਼ੁਰੂਆਤ:** {{startTime}}
|
||||
{{/startTime}}
|
||||
{{#endTime}}
|
||||
🕐 **ਖਾਤਮਾ:** {{endTime}}
|
||||
{{/endTime}}
|
||||
{{#joinLink}}
|
||||
🔗 **ਜੁੜਨ ਲਈ ਲਿੰਕ:** [{{joinLink}}]({{joinLink}})
|
||||
{{/joinLink}}
|
||||
{{/eventMessage}}
|
||||
{{/message}}
|
||||
|
||||
whatsapp.to.chatwoot.message.pix: |-
|
||||
💳 **PIX - ਕਾਪੀ ਅਤੇ ਪੇਸਟ**
|
||||
|
||||
{{#pixData}}
|
||||
{{#merchantName}}
|
||||
**{{merchantName}}**
|
||||
{{/merchantName}}
|
||||
|
||||
{{#key}}
|
||||
**PIX ਕੁੰਜੀ:** {{key}}
|
||||
{{/key}}
|
||||
{{#keyType}}
|
||||
**ਕਿਸਮ:** {{keyType}}
|
||||
{{/keyType}}
|
||||
{{#totalAmount}}
|
||||
**ਰਕਮ:** {{totalAmountFormatted}}
|
||||
{{/totalAmount}}
|
||||
{{#referenceId}}
|
||||
**ਹਵਾਲਾ:** {{referenceId}}
|
||||
{{/referenceId}}
|
||||
|
||||
💳 **PIX ਕਾਪੀ ਅਤੇ ਪੇਸਟ ਭੇਜਿਆ ਗਿਆ**
|
||||
{{/pixData}}
|
||||
|
||||
whatsapp.to.chatwoot.message.unsupported: |-
|
||||
⚠️ **ਇਹ ਸੁਨੇਹੇ ਦੀ ਕਿਸਮ ChatWoot ਵਿੱਚ ਸਮਰਥਿਤ ਨਹੀਂ ਹੈ।**
|
||||
📱 ਇਸਨੂੰ ਦੇਖਣ ਲਈ ਕਿਰਪਾ ਕਰਕੇ **WhatsApp** ਖੋਲ੍ਹੋ।
|
||||
|
||||
ਵੇਰਵੇ: [{{{details.text}}}]({{{details.url}}})
|
||||
|
||||
whatsapp.to.chatwoot.message.facebook.ad: |-
|
||||
📢 **ਫੇਸਬੁੱਕ ਵਿਗਿਆਪਨ**
|
||||
|
||||
**ਸਿਰਲੇਖ:** {{{adData.title}}}
|
||||
|
||||
**ਵੇਰਵਾ:**
|
||||
{{{adData.body}}}
|
||||
|
||||
**ਵਿਗਿਆਪਨ ਲਿੰਕ:** [ਫੇਸਬੁੱਕ 'ਤੇ ਵੇਖੋ]({{{adData.sourceUrl}}})
|
||||
**ਵਿਗਿਆਪਨ ਆਈਡੀ:** {{{adData.sourceId}}}
|
||||
|
||||
---
|
||||
💬 **ਗਾਹਕ ਦਾ ਸੁਨੇਹਾ:**
|
||||
{{{payload.body}}}
|
||||
@@ -1,9 +1,29 @@
|
||||
# Portuguese translations for ChatWoot integration
|
||||
locale.name: '🇧🇷🇵🇹 Português (Portuguese)'
|
||||
app.inbox.contact.name: 'Integração WhatsApp (WAHA)'
|
||||
|
||||
# Código de locale base - deve ser um locale BCP 47 válido
|
||||
# https://en.wikipedia.org/wiki/IETF_language_tag
|
||||
# A WAHA usa isso para formatar números, moeda e data/hora
|
||||
locale.base: 'pt-BR'
|
||||
|
||||
app.inbox.contact.name: 'Integração WhatsApp'
|
||||
app.inbox.contact.avatar.url: 'https://raw.githubusercontent.com/devlikeapro/waha/core/logo.png'
|
||||
|
||||
job.report.error: |
|
||||
# "opções" de date.toLocaleString
|
||||
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options
|
||||
datetime:
|
||||
locales: pt-BR
|
||||
day: 2-digit
|
||||
month: 2-digit
|
||||
year: numeric
|
||||
hour: 2-digit
|
||||
minute: 2-digit
|
||||
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#timezonename
|
||||
timeZoneName: shortGeneric
|
||||
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
timeZone: 'America/Sao_Paulo'
|
||||
|
||||
job.report.error: |-
|
||||
⚠️ **{{{header}}}**
|
||||
{{#attempts.nextDelay}}
|
||||
🔄 Tentando novamente em {{attempts.nextDelay}} segundos...
|
||||
@@ -20,7 +40,7 @@ job.report.error: |
|
||||
```
|
||||
{{/error}}
|
||||
|
||||
job.report.succeeded: |
|
||||
job.report.succeeded: |-
|
||||
✅ **Sucesso**
|
||||
Tentativa: {{{attempts.current}}} / {{{attempts.max}}}
|
||||
Detalhes: [{{{details.text}}}]({{{details.url}}})
|
||||
@@ -33,33 +53,33 @@ whatsapp.message.removing.error:
|
||||
Não foi possível remover uma mensagem do WhatsApp
|
||||
job.scheduled.error.header: Falha ao executar tarefa agendada
|
||||
|
||||
message.from.whatsapp: |
|
||||
message.from.whatsapp: |-
|
||||
{{{text}}}
|
||||
|
||||
📱 *Enviado do WhatsApp*
|
||||
|
||||
message.from.api: |
|
||||
message.from.api: |-
|
||||
{{{text}}}
|
||||
|
||||
📱 *Enviado via API*
|
||||
|
||||
message.removed.in.whatsapp: |
|
||||
message.removed.in.whatsapp: |-
|
||||
❌ *Esta mensagem foi excluída no WhatsApp*
|
||||
|
||||
message.edited.in.whatsapp: |
|
||||
message.edited.in.whatsapp: |-
|
||||
{{{text}}}
|
||||
|
||||
✏️ *Editado no WhatsApp*
|
||||
|
||||
whatsapp.group.message: |
|
||||
{{{text}}}
|
||||
|
||||
whatsapp.group.message: |-
|
||||
👥 *{{{participant}}}*
|
||||
|
||||
whatsapp.reaction.added: |
|
||||
{{{text}}}
|
||||
|
||||
whatsapp.reaction.added: |-
|
||||
*Reagiu com* {{{emoji}}}
|
||||
|
||||
whatsapp.reaction.removed: |
|
||||
whatsapp.reaction.removed: |-
|
||||
*Reação removida*
|
||||
|
||||
whatsapp.contact.group.suffix: 'Grupo'
|
||||
@@ -68,7 +88,7 @@ whatsapp.contact.broadcast.suffix: 'Lista de transmissão'
|
||||
# Aka Stories
|
||||
whatsapp.contact.status.name: 'Status'
|
||||
|
||||
app.connected.message: |
|
||||
app.connected.message: |-
|
||||
🔗 **CONECTADO: Sessão do WhatsApp para Caixa de Entrada do ChatWoot**
|
||||
|
||||
✅ A sessão do WhatsApp **{{{name}}}** foi conectada com sucesso a esta Caixa de Entrada do ChatWoot.
|
||||
@@ -86,7 +106,7 @@ app.connected.message: |
|
||||
|
||||
Vamos começar! 🚀
|
||||
|
||||
app.disconnected.message: |
|
||||
app.disconnected.message: |-
|
||||
🔌 **DESCONECTADO: Sessão do WhatsApp da Caixa de Entrada do ChatWoot**
|
||||
|
||||
❌ A sessão do WhatsApp **{{{name}}}** foi desconectada desta Caixa de Entrada do ChatWoot.
|
||||
@@ -95,12 +115,12 @@ app.disconnected.message: |
|
||||
|
||||
Para reconectar, entre em contato com seu administrador.
|
||||
|
||||
app.updated.message: |
|
||||
app.updated.message: |-
|
||||
🔄 **ATUALIZADO: Configurações da Sessão do WhatsApp**
|
||||
|
||||
✅ As configurações para a sessão do WhatsApp **{{{name}}}** foram atualizadas.
|
||||
|
||||
app.commands.list: |
|
||||
app.commands.list: |-
|
||||
Você pode gerenciar a **Integração WhatsApp** enviando um dos seguintes comandos:
|
||||
|
||||
🖥️ **Sessão**:
|
||||
@@ -128,32 +148,32 @@ app.commands.server.disabled: ⛔ **Os comandos do servidor estão desativados**
|
||||
|
||||
Envie **help** para obter a lista de comandos disponíveis.
|
||||
|
||||
app.help.reminder: |
|
||||
app.help.reminder: |-
|
||||
Envie **help** para obter a lista de comandos disponíveis.
|
||||
|
||||
app.session.status.change: |
|
||||
app.session.status.change: |-
|
||||
{{{emoji}}} A sessão "{{{session}}}" mudou para o status {{{status}}}
|
||||
|
||||
app.session.current.status: |
|
||||
app.session.current.status: |-
|
||||
{{{emoji}}} O status da sessão **{{{session}}}** é **{{{status}}}**
|
||||
**Conta do WhatsApp:**
|
||||
|
||||
📱 **{{{name}}} ({{{id}}})**
|
||||
|
||||
app.session.status.working: |
|
||||
app.session.status.working: |-
|
||||
✅ Esta Caixa de Entrada do ChatWoot está vinculada à **Conta do WhatsApp** e pronta para enviar e receber mensagens!
|
||||
|
||||
📱 **{{{name}}} ({{{id}}})**
|
||||
|
||||
app.session.status.error: |
|
||||
app.session.status.error: |-
|
||||
⚠️ **Esta Caixa de Entrada do ChatWoot está vinculada à Conta do WhatsApp, mas NÃO está pronta para enviar e receber mensagens!**
|
||||
|
||||
Por favor, verifique o status da sessão e tente reiniciá-la ou saia e escaneie o código QR novamente.
|
||||
|
||||
app.session.scan.qr.code: |
|
||||
app.session.scan.qr.code: |-
|
||||
⚠️ **Escaneie o código QR no seu telefone para vincular a Conta do WhatsApp a esta Caixa de Entrada do ChatWoot!**
|
||||
|
||||
app.server.version.and.status: |
|
||||
app.server.version.and.status: |-
|
||||
**Versão:**
|
||||
```
|
||||
{{{version}}}
|
||||
@@ -164,16 +184,16 @@ app.server.version.and.status: |
|
||||
{{{status}}}
|
||||
```
|
||||
|
||||
app.server.reboot: |
|
||||
app.server.reboot: |-
|
||||
O servidor está reiniciando suavemente...
|
||||
|
||||
app.server.reboot.force: |
|
||||
app.server.reboot.force: |-
|
||||
O servidor está reiniciando forçadamente...
|
||||
|
||||
app.logout.success: |
|
||||
app.logout.success: |-
|
||||
✅ Conta desautorizada com sucesso!
|
||||
|
||||
waha.new.version.available: |
|
||||
waha.new.version.available: |-
|
||||
🔄 **Nova Versão Disponível!**
|
||||
|
||||
Versão atual: **{{{currentVersion}}}**
|
||||
@@ -181,7 +201,7 @@ waha.new.version.available: |
|
||||
|
||||
👉 Confira o que há de novo no [**🆕 Registro de Alterações**]({{{changelogUrl}}})
|
||||
|
||||
waha.core.version.used: |
|
||||
waha.core.version.used: |-
|
||||
❤️ **Apoie o WAHA!**
|
||||
|
||||
Você está usando a versão gratuita **WAHA Core**. Se você acha este projeto útil, considere apoiar seu desenvolvimento.
|
||||
@@ -190,20 +210,20 @@ waha.core.version.used: |
|
||||
|
||||
[**🎁 Apoie-nos**]({{{supportUrl}}})
|
||||
|
||||
chatwoot.to.whatsapp.message.text: |
|
||||
chatwoot.to.whatsapp.message.text: |-
|
||||
{{{ content }}}
|
||||
|
||||
chatwoot.to.whatsapp.message.media.caption: |
|
||||
chatwoot.to.whatsapp.message.media.caption: |-
|
||||
{{#singleAttachment}}
|
||||
{{#content}}
|
||||
{{{ content }}}
|
||||
{{/content}}
|
||||
{{/singleAttachment}}
|
||||
|
||||
whatsapp.to.chatwoot.message: |
|
||||
whatsapp.to.chatwoot.message: |-
|
||||
{{{payload.body}}}
|
||||
|
||||
whatsapp.to.chatwoot.message.contacts: |
|
||||
whatsapp.to.chatwoot.message.contacts: |-
|
||||
👤 **Contato(s) compartilhado(s)**
|
||||
|
||||
{{#contacts}}
|
||||
@@ -214,12 +234,24 @@ whatsapp.to.chatwoot.message.contacts: |
|
||||
|
||||
{{/contacts}}
|
||||
|
||||
whatsapp.to.chatwoot.message.location: |
|
||||
whatsapp.to.chatwoot.message.location: |-
|
||||
{{#message}}
|
||||
{{#locationMessage}}
|
||||
📍 **Localização compartilhada**
|
||||
|
||||
https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#name}}
|
||||
**{{name}}**
|
||||
{{/name}}
|
||||
|
||||
{{#address}}
|
||||
📍 **Endereço:** {{address}}
|
||||
{{/address}}
|
||||
|
||||
{{#url}}
|
||||
🌐 **Site:** {{url}}
|
||||
{{/url}}
|
||||
|
||||
🔗 **Ver no mapa:** https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#caption}}{{caption}}{{/caption}}
|
||||
{{/locationMessage}}
|
||||
|
||||
@@ -227,13 +259,131 @@ whatsapp.to.chatwoot.message.location: |
|
||||
📍📡 **Compartilhando localização ao vivo**
|
||||
Abra o **WhatsApp** para ver as atualizações em tempo real.
|
||||
|
||||
https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#name}}
|
||||
**{{name}}**
|
||||
{{/name}}
|
||||
|
||||
{{#address}}
|
||||
📍 **Endereço:** {{address}}
|
||||
{{/address}}
|
||||
|
||||
{{#url}}
|
||||
🌐 **Site:** {{url}}
|
||||
{{/url}}
|
||||
|
||||
🔗 **Ver no mapa:** https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#caption}}{{caption}}{{/caption}}
|
||||
{{/liveLocationMessage}}
|
||||
{{/message}}
|
||||
|
||||
whatsapp.to.chatwoot.message.unsupported: |
|
||||
whatsapp.to.chatwoot.message.poll: |-
|
||||
{{#poll}}
|
||||
📊 **Enquete**
|
||||
|
||||
**{{name}}**
|
||||
{{#options}}
|
||||
- {{optionName}}
|
||||
{{/options}}
|
||||
{{/poll}}
|
||||
|
||||
whatsapp.to.chatwoot.message.list: |-
|
||||
{{#message.listMessage}}
|
||||
{{#title}}
|
||||
*{{{title}}}*
|
||||
{{/title}}
|
||||
{{#description}}
|
||||
{{{description}}}
|
||||
{{/description}}
|
||||
{{#footerText}}
|
||||
{{{footerText}}}
|
||||
{{/footerText}}
|
||||
|
||||
{{#buttonText}}
|
||||
{{{buttonText}}}
|
||||
{{/buttonText}}
|
||||
{{#sections}}
|
||||
{{#title}}
|
||||
{{{title}}}:
|
||||
{{/title}}
|
||||
{{#rows}}
|
||||
{{#title}}
|
||||
- {{{title}}}
|
||||
{{/title}}
|
||||
{{/rows}}
|
||||
|
||||
{{/sections}}
|
||||
{{/message.listMessage}}
|
||||
|
||||
whatsapp.to.chatwoot.message.event: |-
|
||||
{{#message}}
|
||||
{{#eventMessage}}
|
||||
📅 **Evento**
|
||||
|
||||
**{{name}}**
|
||||
|
||||
{{#description}}
|
||||
{{description}}
|
||||
{{/description}}
|
||||
|
||||
{{#location.name}}
|
||||
📍 **Local:** {{location.name}}
|
||||
{{/location.name}}
|
||||
|
||||
{{#startTime}}
|
||||
🕐 **Início:** {{startTime}}
|
||||
{{/startTime}}
|
||||
|
||||
{{#endTime}}
|
||||
🕐 **Fim:** {{endTime}}
|
||||
{{/endTime}}
|
||||
|
||||
{{#joinLink}}
|
||||
🔗 **Link de participação:** [{{joinLink}}]({{joinLink}})
|
||||
{{/joinLink}}
|
||||
{{/eventMessage}}
|
||||
{{/message}}
|
||||
|
||||
whatsapp.to.chatwoot.message.pix: |-
|
||||
💳 **PIX - Copia e Cola**
|
||||
|
||||
{{#pixData}}
|
||||
{{#merchantName}}
|
||||
**{{merchantName}}**
|
||||
{{/merchantName}}
|
||||
|
||||
{{#key}}
|
||||
**Chave PIX:** {{key}}
|
||||
{{/key}}
|
||||
{{#keyType}}
|
||||
**Tipo:** {{keyType}}
|
||||
{{/keyType}}
|
||||
{{#totalAmount}}
|
||||
**Valor:** {{totalAmountFormatted}}
|
||||
{{/totalAmount}}
|
||||
{{#referenceId}}
|
||||
**Referência:** {{referenceId}}
|
||||
{{/referenceId}}
|
||||
|
||||
💳 **PIX Copia e Cola enviado**
|
||||
{{/pixData}}
|
||||
|
||||
whatsapp.to.chatwoot.message.unsupported: |-
|
||||
⚠️ **Esse tipo de mensagem não é suportado no ChatWoot.**
|
||||
📱 Por favor, abra o **WhatsApp** para visualizá-la.
|
||||
|
||||
Detalhes: [{{{details.text}}}]({{{details.url}}})
|
||||
|
||||
whatsapp.to.chatwoot.message.facebook.ad: |-
|
||||
📢 **ANÚNCIO DO FACEBOOK**
|
||||
|
||||
**Título:** {{{adData.title}}}
|
||||
|
||||
**Descrição:**
|
||||
{{{adData.body}}}
|
||||
|
||||
**Link do Anúncio:** [Ver no Facebook]({{{adData.sourceUrl}}})
|
||||
**ID do Anúncio:** {{{adData.sourceId}}}
|
||||
|
||||
---
|
||||
💬 **MENSAGEM DO CLIENTE:**
|
||||
{{{payload.body}}}
|
||||
@@ -1,9 +1,29 @@
|
||||
# Russian translations for ChatWoot integration
|
||||
locale.name: '🇷🇺 Русский (Russian)'
|
||||
app.inbox.contact.name: 'WhatsApp Интеграция (WAHA)'
|
||||
|
||||
# Базовый код локали - должен быть корректной локалью BCP 47
|
||||
# https://en.wikipedia.org/wiki/IETF_language_tag
|
||||
# WAHA использует его для форматирования чисел, валют и даты/времени
|
||||
locale.base: 'ru-RU'
|
||||
|
||||
app.inbox.contact.name: 'WhatsApp Интеграция'
|
||||
app.inbox.contact.avatar.url: 'https://raw.githubusercontent.com/devlikeapro/waha/core/logo.png'
|
||||
|
||||
job.report.error: |
|
||||
# "параметры" из date.toLocaleString
|
||||
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options
|
||||
datetime:
|
||||
locales: ru-RU
|
||||
day: 2-digit
|
||||
month: 2-digit
|
||||
year: numeric
|
||||
hour: 2-digit
|
||||
minute: 2-digit
|
||||
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#timezonename
|
||||
timeZoneName: shortGeneric
|
||||
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
# timeZone: 'Europe/Moscow'
|
||||
|
||||
job.report.error: |-
|
||||
⚠️ **{{{header}}}**
|
||||
{{#attempts.nextDelay}}
|
||||
🔄 Повторная попытка через {{attempts.nextDelay}} секунд...
|
||||
@@ -20,7 +40,7 @@ job.report.error: |
|
||||
```
|
||||
{{/error}}
|
||||
|
||||
job.report.succeeded: |
|
||||
job.report.succeeded: |-
|
||||
✅ **Успешно**
|
||||
Попытка: {{{attempts.current}}} / {{{attempts.max}}}
|
||||
Подробности: [{{{details.text}}}]({{{details.url}}})
|
||||
@@ -30,33 +50,33 @@ whatsapp.message.receiving.error: Не удалось получить сооб
|
||||
whatsapp.message.removing.error: Не удалось удалить сообщение из WhatsApp
|
||||
job.scheduled.error.header: Запланированная задача не выполнена
|
||||
|
||||
message.from.whatsapp: |
|
||||
message.from.whatsapp: |-
|
||||
{{{text}}}
|
||||
|
||||
📱 *Отправлено из WhatsApp*
|
||||
|
||||
message.from.api: |
|
||||
message.from.api: |-
|
||||
{{{text}}}
|
||||
|
||||
📱 *Отправлено через API*
|
||||
|
||||
message.removed.in.whatsapp: |
|
||||
message.removed.in.whatsapp: |-
|
||||
❌ *Это сообщение было удалено в WhatsApp*
|
||||
|
||||
message.edited.in.whatsapp: |
|
||||
message.edited.in.whatsapp: |-
|
||||
{{{text}}}
|
||||
|
||||
✏️ *Отредактировано в WhatsApp*
|
||||
|
||||
whatsapp.group.message: |
|
||||
{{{text}}}
|
||||
|
||||
whatsapp.group.message: |-
|
||||
👥 *{{{participant}}}*
|
||||
|
||||
whatsapp.reaction.added: |
|
||||
{{{text}}}
|
||||
|
||||
whatsapp.reaction.added: |-
|
||||
*Реакция* {{{emoji}}}
|
||||
|
||||
whatsapp.reaction.removed: |
|
||||
whatsapp.reaction.removed: |-
|
||||
*Реакция удалена*
|
||||
|
||||
whatsapp.contact.group.suffix: 'Группа'
|
||||
@@ -65,7 +85,7 @@ whatsapp.contact.broadcast.suffix: 'Список рассылки'
|
||||
# Aka Stories
|
||||
whatsapp.contact.status.name: 'Статус'
|
||||
|
||||
app.connected.message: |
|
||||
app.connected.message: |-
|
||||
🔗 **ПОДКЛЮЧЕНО: Сессия WhatsApp к ChatWoot Inbox**
|
||||
|
||||
✅ Сессия WhatsApp **{{{name}}}** была успешно подключена к этому ChatWoot Inbox.
|
||||
@@ -83,7 +103,7 @@ app.connected.message: |
|
||||
|
||||
Давайте начнем! 🚀
|
||||
|
||||
app.disconnected.message: |
|
||||
app.disconnected.message: |-
|
||||
🔌 **ОТКЛЮЧЕНО: Сессия WhatsApp от ChatWoot Inbox**
|
||||
|
||||
❌ Сессия WhatsApp **{{{name}}}** была отключена от этого ChatWoot Inbox.
|
||||
@@ -92,12 +112,12 @@ app.disconnected.message: |
|
||||
|
||||
Для переподключения, пожалуйста, обратитесь к вашему администратору.
|
||||
|
||||
app.updated.message: |
|
||||
app.updated.message: |-
|
||||
🔄 **ОБНОВЛЕНО: Настройки сессии WhatsApp**
|
||||
|
||||
✅ Настройки для сессии WhatsApp **{{{name}}}** были обновлены.
|
||||
|
||||
app.commands.list: |
|
||||
app.commands.list: |-
|
||||
Вы можете управлять **WhatsApp Интеграцией**, отправив одну из следующих команд:
|
||||
|
||||
🖥️ **Сессия**:
|
||||
@@ -125,32 +145,32 @@ app.commands.server.disabled: ⛔ **Команды сервера отключе
|
||||
|
||||
Отправьте **help**, чтобы получить список доступных команд.
|
||||
|
||||
app.help.reminder: |
|
||||
app.help.reminder: |-
|
||||
Отправьте **help**, чтобы получить список доступных команд.
|
||||
|
||||
app.session.status.change: |
|
||||
app.session.status.change: |-
|
||||
{{{emoji}}} Сессия "{{{session}}}" переключилась в статус {{{status}}}
|
||||
|
||||
app.session.current.status: |
|
||||
app.session.current.status: |-
|
||||
{{{emoji}}} Статус сессии **{{{session}}}** - **{{{status}}}**
|
||||
**Аккаунт WhatsApp:**
|
||||
|
||||
📱 **{{{name}}} ({{{id}}})**
|
||||
|
||||
app.session.status.working: |
|
||||
app.session.status.working: |-
|
||||
✅ Этот ChatWoot Inbox связан с **аккаунтом WhatsApp** и готов отправлять и получать сообщения!
|
||||
|
||||
📱 **{{{name}}} ({{{id}}})**
|
||||
|
||||
app.session.status.error: |
|
||||
app.session.status.error: |-
|
||||
⚠️ **Этот ChatWoot Inbox связан с аккаунтом WhatsApp, но НЕ готов отправлять и получать сообщения!**
|
||||
|
||||
Пожалуйста, проверьте статус сессии и попробуйте перезапустить её или выйдите и отсканируйте QR-код снова.
|
||||
|
||||
app.session.scan.qr.code: |
|
||||
app.session.scan.qr.code: |-
|
||||
⚠️ **Отсканируйте QR-код на вашем телефоне, чтобы связать аккаунт WhatsApp с этим ChatWoot Inbox!**
|
||||
|
||||
app.server.version.and.status: |
|
||||
app.server.version.and.status: |-
|
||||
**Версия:**
|
||||
```
|
||||
{{{version}}}
|
||||
@@ -161,16 +181,16 @@ app.server.version.and.status: |
|
||||
{{{status}}}
|
||||
```
|
||||
|
||||
app.server.reboot: |
|
||||
app.server.reboot: |-
|
||||
Сервер корректно перезагружается...
|
||||
|
||||
app.server.reboot.force: |
|
||||
app.server.reboot.force: |-
|
||||
Сервер принудительно перезагружается...
|
||||
|
||||
app.logout.success: |
|
||||
app.logout.success: |-
|
||||
✅ Аккаунт успешно деавторизован!
|
||||
|
||||
waha.new.version.available: |
|
||||
waha.new.version.available: |-
|
||||
🔄 **Доступна новая версия!**
|
||||
|
||||
Текущая версия: **{{{currentVersion}}}**
|
||||
@@ -178,7 +198,7 @@ waha.new.version.available: |
|
||||
|
||||
👉 Узнайте, что нового в [**🆕 Списке изменений**]({{{changelogUrl}}})
|
||||
|
||||
waha.core.version.used: |
|
||||
waha.core.version.used: |-
|
||||
❤️ **Поддержите WAHA!**
|
||||
|
||||
Вы используете бесплатную версию **WAHA Core**. Если вы находите этот проект полезным, пожалуйста, рассмотрите возможность поддержать его разработку.
|
||||
@@ -187,20 +207,20 @@ waha.core.version.used: |
|
||||
|
||||
[**🎁 Поддержать нас**]({{{supportUrl}}})
|
||||
|
||||
chatwoot.to.whatsapp.message.text: |
|
||||
chatwoot.to.whatsapp.message.text: |-
|
||||
{{{ content }}}
|
||||
|
||||
chatwoot.to.whatsapp.message.media.caption: |
|
||||
chatwoot.to.whatsapp.message.media.caption: |-
|
||||
{{#singleAttachment}}
|
||||
{{#content}}
|
||||
{{{ content }}}
|
||||
{{/content}}
|
||||
{{/singleAttachment}}
|
||||
|
||||
whatsapp.to.chatwoot.message: |
|
||||
whatsapp.to.chatwoot.message: |-
|
||||
{{{payload.body}}}
|
||||
|
||||
whatsapp.to.chatwoot.message.contacts: |
|
||||
whatsapp.to.chatwoot.message.contacts: |-
|
||||
👤 **Переданные контакты**
|
||||
|
||||
{{#contacts}}
|
||||
@@ -211,12 +231,24 @@ whatsapp.to.chatwoot.message.contacts: |
|
||||
|
||||
{{/contacts}}
|
||||
|
||||
whatsapp.to.chatwoot.message.location: |
|
||||
whatsapp.to.chatwoot.message.location: |-
|
||||
{{#message}}
|
||||
{{#locationMessage}}
|
||||
📍 **Переданное местоположение**
|
||||
|
||||
https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#name}}
|
||||
**{{name}}**
|
||||
{{/name}}
|
||||
|
||||
{{#address}}
|
||||
📍 **Адрес:** {{address}}
|
||||
{{/address}}
|
||||
|
||||
{{#url}}
|
||||
🌐 **Сайт:** {{url}}
|
||||
{{/url}}
|
||||
|
||||
🔗 **Открыть на карте:** https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#caption}}{{caption}}{{/caption}}
|
||||
{{/locationMessage}}
|
||||
|
||||
@@ -224,13 +256,127 @@ whatsapp.to.chatwoot.message.location: |
|
||||
📍📡 **Делится геопозицией в реальном времени**
|
||||
Откройте **WhatsApp**, чтобы увидеть обновления в реальном времени.
|
||||
|
||||
https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#name}}
|
||||
**{{name}}**
|
||||
{{/name}}
|
||||
|
||||
{{#address}}
|
||||
📍 **Адрес:** {{address}}
|
||||
{{/address}}
|
||||
|
||||
{{#url}}
|
||||
🌐 **Сайт:** {{url}}
|
||||
{{/url}}
|
||||
|
||||
🔗 **Открыть на карте:** https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#caption}}{{caption}}{{/caption}}
|
||||
{{/liveLocationMessage}}
|
||||
{{/message}}
|
||||
|
||||
whatsapp.to.chatwoot.message.unsupported: |
|
||||
whatsapp.to.chatwoot.message.poll: |-
|
||||
{{#poll}}
|
||||
📊 **Опрос**
|
||||
|
||||
**{{name}}**
|
||||
{{#options}}
|
||||
- {{optionName}}
|
||||
{{/options}}
|
||||
{{/poll}}
|
||||
|
||||
whatsapp.to.chatwoot.message.list: |-
|
||||
{{#message.listMessage}}
|
||||
{{#title}}
|
||||
*{{{title}}}*
|
||||
{{/title}}
|
||||
{{#description}}
|
||||
{{{description}}}
|
||||
{{/description}}
|
||||
{{#footerText}}
|
||||
{{{footerText}}}
|
||||
{{/footerText}}
|
||||
|
||||
{{#buttonText}}
|
||||
{{{buttonText}}}
|
||||
{{/buttonText}}
|
||||
{{#sections}}
|
||||
{{#title}}
|
||||
{{{title}}}:
|
||||
{{/title}}
|
||||
{{#rows}}
|
||||
{{#title}}
|
||||
- {{{title}}}
|
||||
{{/title}}
|
||||
{{/rows}}
|
||||
|
||||
{{/sections}}
|
||||
{{/message.listMessage}}
|
||||
|
||||
whatsapp.to.chatwoot.message.event: |-
|
||||
{{#message}}
|
||||
{{#eventMessage}}
|
||||
📅 **Событие**
|
||||
|
||||
**{{name}}**
|
||||
{{#description}}
|
||||
{{description}}
|
||||
{{/description}}
|
||||
|
||||
{{#location.name}}
|
||||
📍 **Место:** {{location.name}}
|
||||
{{/location.name}}
|
||||
{{#startTime}}
|
||||
🕐 **Начало:** {{startTime}}
|
||||
{{/startTime}}
|
||||
{{#endTime}}
|
||||
🕐 **Окончание:** {{endTime}}
|
||||
{{/endTime}}
|
||||
{{#joinLink}}
|
||||
🔗 **Ссылка для участия:** [{{joinLink}}]({{joinLink}})
|
||||
{{/joinLink}}
|
||||
{{/eventMessage}}
|
||||
{{/message}}
|
||||
|
||||
whatsapp.to.chatwoot.message.pix: |-
|
||||
💳 **PIX - Копировать и вставить**
|
||||
|
||||
{{#pixData}}
|
||||
{{#merchantName}}
|
||||
**{{merchantName}}**
|
||||
{{/merchantName}}
|
||||
|
||||
{{#key}}
|
||||
**Ключ PIX:** {{key}}
|
||||
{{/key}}
|
||||
{{#keyType}}
|
||||
**Тип:** {{keyType}}
|
||||
{{/keyType}}
|
||||
{{#totalAmount}}
|
||||
**Сумма:** {{totalAmountFormatted}}
|
||||
{{/totalAmount}}
|
||||
{{#referenceId}}
|
||||
**Референс:** {{referenceId}}
|
||||
{{/referenceId}}
|
||||
|
||||
💳 **PIX Копировать и вставить отправлен**
|
||||
{{/pixData}}
|
||||
|
||||
whatsapp.to.chatwoot.message.unsupported: |-
|
||||
⚠️ **Этот тип сообщения не поддерживается в ChatWoot.**
|
||||
📱 Пожалуйста, откройте **WhatsApp**, чтобы просмотреть.
|
||||
|
||||
Подробности: [{{{details.text}}}]({{{details.url}}})
|
||||
|
||||
whatsapp.to.chatwoot.message.facebook.ad: |-
|
||||
📢 **РЕКЛАМА FACEBOOK**
|
||||
|
||||
**Заголовок:** {{{adData.title}}}
|
||||
|
||||
**Описание:**
|
||||
{{{adData.body}}}
|
||||
|
||||
**Ссылка на объявление:** [Посмотреть в Facebook]({{{adData.sourceUrl}}})
|
||||
**Идентификатор объявления:** {{{adData.sourceId}}}
|
||||
|
||||
---
|
||||
💬 **Сообщение клиента:**
|
||||
{{{payload.body}}}
|
||||
@@ -1,9 +1,29 @@
|
||||
# Turkish translations for ChatWoot integration
|
||||
locale.name: '🇹🇷 Türkçe (Turkish)'
|
||||
app.inbox.contact.name: 'WhatsApp Entegrasyonu (WAHA)'
|
||||
|
||||
# Temel yerel kodu - geçerli bir BCP 47 yerel kodu olmalı
|
||||
# https://en.wikipedia.org/wiki/IETF_language_tag
|
||||
# WAHA bunu sayı, para birimi ve tarih/saat gösterimi için kullanır
|
||||
locale.base: 'tr-TR'
|
||||
|
||||
app.inbox.contact.name: 'WhatsApp Entegrasyonu'
|
||||
app.inbox.contact.avatar.url: 'https://raw.githubusercontent.com/devlikeapro/waha/core/logo.png'
|
||||
|
||||
job.report.error: |
|
||||
# date.toLocaleString için "options"
|
||||
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options
|
||||
datetime:
|
||||
locales: tr-TR
|
||||
day: 2-digit
|
||||
month: 2-digit
|
||||
year: numeric
|
||||
hour: 2-digit
|
||||
minute: 2-digit
|
||||
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#timezonename
|
||||
timeZoneName: shortGeneric
|
||||
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
# timeZone: 'Europe/Istanbul'
|
||||
|
||||
job.report.error: |-
|
||||
⚠️ **{{{header}}}**
|
||||
{{#attempts.nextDelay}}
|
||||
🔄 {{attempts.nextDelay}} saniye içinde tekrar deneniyor...
|
||||
@@ -20,7 +40,7 @@ job.report.error: |
|
||||
```
|
||||
{{/error}}
|
||||
|
||||
job.report.succeeded: |
|
||||
job.report.succeeded: |-
|
||||
✅ **Başarılı**
|
||||
Deneme: {{{attempts.current}}} / {{{attempts.max}}}
|
||||
Detaylar: [{{{details.text}}}]({{{details.url}}})
|
||||
@@ -30,33 +50,33 @@ whatsapp.message.receiving.error: WhatsApp'tan mesaj alınamadı
|
||||
whatsapp.message.removing.error: WhatsApp'tan mesaj kaldırılamadı
|
||||
job.scheduled.error.header: Zamanlanmış görev yürütülemedi
|
||||
|
||||
message.from.whatsapp: |
|
||||
message.from.whatsapp: |-
|
||||
{{{text}}}
|
||||
|
||||
📱 *WhatsApp'tan gönderildi*
|
||||
|
||||
message.from.api: |
|
||||
message.from.api: |-
|
||||
{{{text}}}
|
||||
|
||||
📱 *API aracılığıyla gönderildi*
|
||||
|
||||
message.removed.in.whatsapp: |
|
||||
message.removed.in.whatsapp: |-
|
||||
❌ *Bu mesaj WhatsApp'ta silindi*
|
||||
|
||||
message.edited.in.whatsapp: |
|
||||
message.edited.in.whatsapp: |-
|
||||
{{{text}}}
|
||||
|
||||
✏️ *WhatsApp'ta düzenlendi*
|
||||
|
||||
whatsapp.group.message: |
|
||||
{{{text}}}
|
||||
|
||||
whatsapp.group.message: |-
|
||||
👥 *{{{participant}}}*
|
||||
|
||||
whatsapp.reaction.added: |
|
||||
{{{text}}}
|
||||
|
||||
whatsapp.reaction.added: |-
|
||||
*Tepki verdi* {{{emoji}}}
|
||||
|
||||
whatsapp.reaction.removed: |
|
||||
whatsapp.reaction.removed: |-
|
||||
*Tepki kaldırıldı*
|
||||
|
||||
whatsapp.contact.group.suffix: 'Grup'
|
||||
@@ -65,7 +85,7 @@ whatsapp.contact.broadcast.suffix: 'Yayın Listesi'
|
||||
# Aka Stories
|
||||
whatsapp.contact.status.name: 'Durum'
|
||||
|
||||
app.connected.message: |
|
||||
app.connected.message: |-
|
||||
🔗 **BAĞLANDI: WhatsApp Oturumu ChatWoot Gelen Kutusuna**
|
||||
|
||||
✅ WhatsApp oturumu **{{{name}}}** bu ChatWoot Gelen Kutusuna başarıyla bağlandı.
|
||||
@@ -83,7 +103,7 @@ app.connected.message: |
|
||||
|
||||
Hadi başlayalım! 🚀
|
||||
|
||||
app.disconnected.message: |
|
||||
app.disconnected.message: |-
|
||||
🔌 **BAĞLANTI KESİLDİ: WhatsApp Oturumu ChatWoot Gelen Kutusundan**
|
||||
|
||||
❌ WhatsApp oturumu **{{{name}}}** bu ChatWoot Gelen Kutusundan bağlantısı kesildi.
|
||||
@@ -92,12 +112,12 @@ app.disconnected.message: |
|
||||
|
||||
Yeniden bağlanmak için, lütfen yöneticinizle iletişime geçin.
|
||||
|
||||
app.updated.message: |
|
||||
app.updated.message: |-
|
||||
🔄 **GÜNCELLENDİ: WhatsApp Oturum Ayarları**
|
||||
|
||||
✅ WhatsApp oturumu **{{{name}}}** için ayarlar güncellendi.
|
||||
|
||||
app.commands.list: |
|
||||
app.commands.list: |-
|
||||
Aşağıdaki komutlardan birini göndererek **WhatsApp Entegrasyonu**nu yönetebilirsiniz:
|
||||
|
||||
🖥️ **Oturum**:
|
||||
@@ -125,32 +145,32 @@ app.commands.server.disabled: ⛔ **Sunucu komutları devre dışı**.
|
||||
|
||||
Kullanılabilir komutların listesini almak için **help** gönderin.
|
||||
|
||||
app.help.reminder: |
|
||||
app.help.reminder: |-
|
||||
Kullanılabilir komutların listesini almak için **help** gönderin.
|
||||
|
||||
app.session.status.change: |
|
||||
app.session.status.change: |-
|
||||
{{{emoji}}} "{{{session}}}" oturumu {{{status}}} durumuna geçti
|
||||
|
||||
app.session.current.status: |
|
||||
app.session.current.status: |-
|
||||
{{{emoji}}} **{{{session}}}** oturum durumu **{{{status}}}** içinde
|
||||
**WhatsApp Hesabı:**
|
||||
|
||||
📱 **{{{name}}} ({{{id}}})**
|
||||
|
||||
app.session.status.working: |
|
||||
app.session.status.working: |-
|
||||
✅ Bu ChatWoot Gelen Kutusu **WhatsApp Hesabına** bağlı ve mesaj gönderip almaya hazır!
|
||||
|
||||
📱 **{{{name}}} ({{{id}}})**
|
||||
|
||||
app.session.status.error: |
|
||||
app.session.status.error: |-
|
||||
⚠️ **Bu ChatWoot Gelen Kutusu WhatsApp Hesabına bağlı ancak mesaj gönderip almaya hazır DEĞİL!**
|
||||
|
||||
Lütfen oturum durumunu kontrol edin ve yeniden başlatmayı deneyin veya çıkış yapın ve QR kodu tekrar tarayın.
|
||||
|
||||
app.session.scan.qr.code: |
|
||||
app.session.scan.qr.code: |-
|
||||
⚠️ **WhatsApp Hesabını bu ChatWoot Gelen Kutusuna bağlamak için telefonunuzda QR kodu tarayın!**
|
||||
|
||||
app.server.version.and.status: |
|
||||
app.server.version.and.status: |-
|
||||
**Sürüm:**
|
||||
```
|
||||
{{{version}}}
|
||||
@@ -161,16 +181,16 @@ app.server.version.and.status: |
|
||||
{{{status}}}
|
||||
```
|
||||
|
||||
app.server.reboot: |
|
||||
app.server.reboot: |-
|
||||
Sunucu nazikçe yeniden başlatılıyor...
|
||||
|
||||
app.server.reboot.force: |
|
||||
app.server.reboot.force: |-
|
||||
Sunucu zorla yeniden başlatılıyor...
|
||||
|
||||
app.logout.success: |
|
||||
app.logout.success: |-
|
||||
✅ Hesap başarıyla yetkilendirilmedi!
|
||||
|
||||
waha.new.version.available: |
|
||||
waha.new.version.available: |-
|
||||
🔄 **Yeni Sürüm Mevcut!**
|
||||
|
||||
Mevcut sürüm: **{{{currentVersion}}}**
|
||||
@@ -178,7 +198,7 @@ waha.new.version.available: |
|
||||
|
||||
👉 [**🆕 Değişiklik Günlüğü**]({{{changelogUrl}}}) içinde yenilikleri kontrol edin
|
||||
|
||||
waha.core.version.used: |
|
||||
waha.core.version.used: |-
|
||||
❤️ **WAHA'yı Destekleyin!**
|
||||
|
||||
Ücretsiz **WAHA Core** sürümünü kullanıyorsunuz. Bu projeyi faydalı buluyorsanız, lütfen geliştirilmesini desteklemeyi düşünün.
|
||||
@@ -187,20 +207,20 @@ waha.core.version.used: |
|
||||
|
||||
[**🎁 Bizi Destekleyin**]({{{supportUrl}}})
|
||||
|
||||
chatwoot.to.whatsapp.message.text: |
|
||||
chatwoot.to.whatsapp.message.text: |-
|
||||
{{{ content }}}
|
||||
|
||||
chatwoot.to.whatsapp.message.media.caption: |
|
||||
chatwoot.to.whatsapp.message.media.caption: |-
|
||||
{{#singleAttachment}}
|
||||
{{#content}}
|
||||
{{{ content }}}
|
||||
{{/content}}
|
||||
{{/singleAttachment}}
|
||||
|
||||
whatsapp.to.chatwoot.message: |
|
||||
whatsapp.to.chatwoot.message: |-
|
||||
{{{payload.body}}}
|
||||
|
||||
whatsapp.to.chatwoot.message.contacts: |
|
||||
whatsapp.to.chatwoot.message.contacts: |-
|
||||
👤 **Paylaşılan Kişi(ler)**
|
||||
|
||||
{{#contacts}}
|
||||
@@ -211,12 +231,24 @@ whatsapp.to.chatwoot.message.contacts: |
|
||||
|
||||
{{/contacts}}
|
||||
|
||||
whatsapp.to.chatwoot.message.location: |
|
||||
whatsapp.to.chatwoot.message.location: |-
|
||||
{{#message}}
|
||||
{{#locationMessage}}
|
||||
📍 **Paylaşılan Konum**
|
||||
|
||||
https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#name}}
|
||||
**{{name}}**
|
||||
{{/name}}
|
||||
|
||||
{{#address}}
|
||||
📍 **Adres:** {{address}}
|
||||
{{/address}}
|
||||
|
||||
{{#url}}
|
||||
🌐 **Web sitesi:** {{url}}
|
||||
{{/url}}
|
||||
|
||||
🔗 **Haritada görüntüle:** https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#caption}}{{caption}}{{/caption}}
|
||||
{{/locationMessage}}
|
||||
|
||||
@@ -224,13 +256,127 @@ whatsapp.to.chatwoot.message.location: |
|
||||
📍📡 **Canlı Konum Paylaşılıyor**
|
||||
Gerçek zamanlı güncellemeleri görmek için **WhatsApp’ı** açın.
|
||||
|
||||
https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#name}}
|
||||
**{{name}}**
|
||||
{{/name}}
|
||||
|
||||
{{#address}}
|
||||
📍 **Adres:** {{address}}
|
||||
{{/address}}
|
||||
|
||||
{{#url}}
|
||||
🌐 **Web sitesi:** {{url}}
|
||||
{{/url}}
|
||||
|
||||
🔗 **Haritada görüntüle:** https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#caption}}{{caption}}{{/caption}}
|
||||
{{/liveLocationMessage}}
|
||||
{{/message}}
|
||||
|
||||
whatsapp.to.chatwoot.message.unsupported: |
|
||||
whatsapp.to.chatwoot.message.poll: |-
|
||||
{{#poll}}
|
||||
📊 **Anket**
|
||||
|
||||
**{{name}}**
|
||||
{{#options}}
|
||||
- {{optionName}}
|
||||
{{/options}}
|
||||
{{/poll}}
|
||||
|
||||
whatsapp.to.chatwoot.message.list: |-
|
||||
{{#message.listMessage}}
|
||||
{{#title}}
|
||||
*{{{title}}}*
|
||||
{{/title}}
|
||||
{{#description}}
|
||||
{{{description}}}
|
||||
{{/description}}
|
||||
{{#footerText}}
|
||||
{{{footerText}}}
|
||||
{{/footerText}}
|
||||
|
||||
{{#buttonText}}
|
||||
{{{buttonText}}}
|
||||
{{/buttonText}}
|
||||
{{#sections}}
|
||||
{{#title}}
|
||||
{{{title}}}:
|
||||
{{/title}}
|
||||
{{#rows}}
|
||||
{{#title}}
|
||||
- {{{title}}}
|
||||
{{/title}}
|
||||
{{/rows}}
|
||||
|
||||
{{/sections}}
|
||||
{{/message.listMessage}}
|
||||
|
||||
whatsapp.to.chatwoot.message.event: |-
|
||||
{{#message}}
|
||||
{{#eventMessage}}
|
||||
📅 **Etkinlik**
|
||||
|
||||
**{{name}}**
|
||||
{{#description}}
|
||||
{{description}}
|
||||
{{/description}}
|
||||
|
||||
{{#location.name}}
|
||||
📍 **Konum:** {{location.name}}
|
||||
{{/location.name}}
|
||||
{{#startTime}}
|
||||
🕐 **Başlangıç:** {{startTime}}
|
||||
{{/startTime}}
|
||||
{{#endTime}}
|
||||
🕐 **Bitiş:** {{endTime}}
|
||||
{{/endTime}}
|
||||
{{#joinLink}}
|
||||
🔗 **Katılma bağlantısı:** [{{joinLink}}]({{joinLink}})
|
||||
{{/joinLink}}
|
||||
{{/eventMessage}}
|
||||
{{/message}}
|
||||
|
||||
whatsapp.to.chatwoot.message.pix: |-
|
||||
💳 **PIX - Kopyala ve Yapıştır**
|
||||
|
||||
{{#pixData}}
|
||||
{{#merchantName}}
|
||||
**{{merchantName}}**
|
||||
{{/merchantName}}
|
||||
|
||||
{{#key}}
|
||||
**PIX Anahtarı:** {{key}}
|
||||
{{/key}}
|
||||
{{#keyType}}
|
||||
**Tür:** {{keyType}}
|
||||
{{/keyType}}
|
||||
{{#totalAmount}}
|
||||
**Tutar:** {{totalAmountFormatted}}
|
||||
{{/totalAmount}}
|
||||
{{#referenceId}}
|
||||
**Referans:** {{referenceId}}
|
||||
{{/referenceId}}
|
||||
|
||||
💳 **PIX Kopyala ve Yapıştır gönderildi**
|
||||
{{/pixData}}
|
||||
|
||||
whatsapp.to.chatwoot.message.unsupported: |-
|
||||
⚠️ **Bu mesaj türü ChatWoot’ta desteklenmiyor.**
|
||||
📱 Görüntülemek için lütfen **WhatsApp’ı** açın.
|
||||
|
||||
Ayrıntılar: [{{{details.text}}}]({{{details.url}}})
|
||||
|
||||
whatsapp.to.chatwoot.message.facebook.ad: |-
|
||||
📢 **FACEBOOK İLANI**
|
||||
|
||||
**Başlık:** {{{adData.title}}}
|
||||
|
||||
**Açıklama:**
|
||||
{{{adData.body}}}
|
||||
|
||||
**İlan Bağlantısı:** [Facebook’ta Görüntüle]({{{adData.sourceUrl}}})
|
||||
**İlan Kimliği:** {{{adData.sourceId}}}
|
||||
|
||||
---
|
||||
💬 **Müşteri Mesajı:**
|
||||
{{{payload.body}}}
|
||||
@@ -1,9 +1,29 @@
|
||||
# Ukrainian translations for ChatWoot integration
|
||||
locale.name: '🇺🇦 Українська (Ukrainian)'
|
||||
app.inbox.contact.name: 'Інтеграція WhatsApp (WAHA)'
|
||||
|
||||
# Базовий код локалі - має бути чинною локаллю BCP 47
|
||||
# https://en.wikipedia.org/wiki/IETF_language_tag
|
||||
# WAHA використовує його для форматування чисел, валют і дати/часу
|
||||
locale.base: 'uk-UA'
|
||||
|
||||
app.inbox.contact.name: 'Інтеграція WhatsApp'
|
||||
app.inbox.contact.avatar.url: 'https://raw.githubusercontent.com/devlikeapro/waha/core/logo.png'
|
||||
|
||||
job.report.error: |
|
||||
# "параметри" з date.toLocaleString
|
||||
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options
|
||||
datetime:
|
||||
locales: uk-UA
|
||||
day: 2-digit
|
||||
month: 2-digit
|
||||
year: numeric
|
||||
hour: 2-digit
|
||||
minute: 2-digit
|
||||
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#timezonename
|
||||
timeZoneName: shortGeneric
|
||||
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
# timeZone: 'Europe/Kyiv'
|
||||
|
||||
job.report.error: |-
|
||||
⚠️ **{{{header}}}**
|
||||
{{#attempts.nextDelay}}
|
||||
🔄 Повторна спроба через {{attempts.nextDelay}} секунд...
|
||||
@@ -20,7 +40,7 @@ job.report.error: |
|
||||
```
|
||||
{{/error}}
|
||||
|
||||
job.report.succeeded: |
|
||||
job.report.succeeded: |-
|
||||
✅ **Успішно**
|
||||
Спроба: {{{attempts.current}}} / {{{attempts.max}}}
|
||||
Деталі: [{{{details.text}}}]({{{details.url}}})
|
||||
@@ -30,33 +50,33 @@ whatsapp.message.receiving.error: Не вдалося отримати пові
|
||||
whatsapp.message.removing.error: Не вдалося видалити повідомлення з WhatsApp
|
||||
job.scheduled.error.header: Заплановане завдання не вдалося виконати
|
||||
|
||||
message.from.whatsapp: |
|
||||
message.from.whatsapp: |-
|
||||
{{{text}}}
|
||||
|
||||
📱 *Надіслано з WhatsApp*
|
||||
|
||||
message.from.api: |
|
||||
message.from.api: |-
|
||||
{{{text}}}
|
||||
|
||||
📱 *Надіслано через API*
|
||||
|
||||
message.removed.in.whatsapp: |
|
||||
message.removed.in.whatsapp: |-
|
||||
❌ *Це повідомлення було видалено у WhatsApp*
|
||||
|
||||
message.edited.in.whatsapp: |
|
||||
message.edited.in.whatsapp: |-
|
||||
{{{text}}}
|
||||
|
||||
✏️ *Відредаговано у WhatsApp*
|
||||
|
||||
whatsapp.group.message: |
|
||||
{{{text}}}
|
||||
|
||||
whatsapp.group.message: |-
|
||||
👥 *{{{participant}}}*
|
||||
|
||||
whatsapp.reaction.added: |
|
||||
{{{text}}}
|
||||
|
||||
whatsapp.reaction.added: |-
|
||||
*Реакція* {{{emoji}}}
|
||||
|
||||
whatsapp.reaction.removed: |
|
||||
whatsapp.reaction.removed: |-
|
||||
*Реакцію видалено*
|
||||
|
||||
whatsapp.contact.group.suffix: 'Група'
|
||||
@@ -65,7 +85,7 @@ whatsapp.contact.broadcast.suffix: 'Список розсилки'
|
||||
# Aka Stories
|
||||
whatsapp.contact.status.name: 'Статус'
|
||||
|
||||
app.connected.message: |
|
||||
app.connected.message: |-
|
||||
🔗 **ПІДКЛЮЧЕНО: Сесія WhatsApp до Вхідних ChatWoot**
|
||||
|
||||
✅ Сесія WhatsApp **{{{name}}}** була успішно підключена до цих Вхідних ChatWoot.
|
||||
@@ -83,7 +103,7 @@ app.connected.message: |
|
||||
|
||||
Давайте почнемо! 🚀
|
||||
|
||||
app.disconnected.message: |
|
||||
app.disconnected.message: |-
|
||||
🔌 **ВІДКЛЮЧЕНО: Сесія WhatsApp від Вхідних ChatWoot**
|
||||
|
||||
❌ Сесія WhatsApp **{{{name}}}** була відключена від цих Вхідних ChatWoot.
|
||||
@@ -92,12 +112,12 @@ app.disconnected.message: |
|
||||
|
||||
Щоб повторно підключитися, зверніться до свого адміністратора.
|
||||
|
||||
app.updated.message: |
|
||||
app.updated.message: |-
|
||||
🔄 **ОНОВЛЕНО: Налаштування сесії WhatsApp**
|
||||
|
||||
✅ Налаштування для сесії WhatsApp **{{{name}}}** були оновлені.
|
||||
|
||||
app.commands.list: |
|
||||
app.commands.list: |-
|
||||
Ви можете керувати **Інтеграцією WhatsApp**, надіславши одну з наступних команд:
|
||||
|
||||
🖥️ **Сесія**:
|
||||
@@ -125,32 +145,32 @@ app.commands.server.disabled: ⛔ **Команди сервера вимкнен
|
||||
|
||||
Надішліть **help**, щоб отримати список доступних команд.
|
||||
|
||||
app.help.reminder: |
|
||||
app.help.reminder: |-
|
||||
Надішліть **help**, щоб отримати список доступних команд.
|
||||
|
||||
app.session.status.change: |
|
||||
app.session.status.change: |-
|
||||
{{{emoji}}} Сесія "{{{session}}}" перейшла у статус {{{status}}}
|
||||
|
||||
app.session.current.status: |
|
||||
app.session.current.status: |-
|
||||
{{{emoji}}} Статус сесії **{{{session}}}** - **{{{status}}}**
|
||||
**Обліковий запис WhatsApp:**
|
||||
|
||||
📱 **{{{name}}} ({{{id}}})**
|
||||
|
||||
app.session.status.working: |
|
||||
app.session.status.working: |-
|
||||
✅ Ці Вхідні ChatWoot пов'язані з **Обліковим записом WhatsApp** і готові надсилати та отримувати повідомлення!
|
||||
|
||||
📱 **{{{name}}} ({{{id}}})**
|
||||
|
||||
app.session.status.error: |
|
||||
app.session.status.error: |-
|
||||
⚠️ **Ці Вхідні ChatWoot пов'язані з Обліковим записом WhatsApp, але НЕ готові надсилати та отримувати повідомлення!**
|
||||
|
||||
Будь ласка, перевірте статус сесії та спробуйте перезапустити її або вийдіть і відскануйте QR-код знову.
|
||||
|
||||
app.session.scan.qr.code: |
|
||||
app.session.scan.qr.code: |-
|
||||
⚠️ **Відскануйте QR-код на вашому телефоні, щоб пов'язати Обліковий запис WhatsApp з цими Вхідними ChatWoot!**
|
||||
|
||||
app.server.version.and.status: |
|
||||
app.server.version.and.status: |-
|
||||
**Версія:**
|
||||
```
|
||||
{{{version}}}
|
||||
@@ -161,16 +181,16 @@ app.server.version.and.status: |
|
||||
{{{status}}}
|
||||
```
|
||||
|
||||
app.server.reboot: |
|
||||
app.server.reboot: |-
|
||||
Сервер плавно перезавантажується...
|
||||
|
||||
app.server.reboot.force: |
|
||||
app.server.reboot.force: |-
|
||||
Сервер примусово перезавантажується...
|
||||
|
||||
app.logout.success: |
|
||||
app.logout.success: |-
|
||||
✅ Обліковий запис успішно деавторизовано!
|
||||
|
||||
waha.new.version.available: |
|
||||
waha.new.version.available: |-
|
||||
🔄 **Доступна нова версія!**
|
||||
|
||||
Поточна версія: **{{{currentVersion}}}**
|
||||
@@ -178,7 +198,7 @@ waha.new.version.available: |
|
||||
|
||||
👉 Перевірте, що нового у [**🆕 Журналі змін**]({{{changelogUrl}}})
|
||||
|
||||
waha.core.version.used: |
|
||||
waha.core.version.used: |-
|
||||
❤️ **Підтримайте WAHA!**
|
||||
|
||||
Ви використовуєте безкоштовну версію **WAHA Core**. Якщо ви вважаєте цей проект корисним, будь ласка, розгляньте можливість підтримати його розробку.
|
||||
@@ -187,20 +207,20 @@ waha.core.version.used: |
|
||||
|
||||
[**🎁 Підтримайте нас**]({{{supportUrl}}})
|
||||
|
||||
chatwoot.to.whatsapp.message.text: |
|
||||
chatwoot.to.whatsapp.message.text: |-
|
||||
{{{ content }}}
|
||||
|
||||
chatwoot.to.whatsapp.message.media.caption: |
|
||||
chatwoot.to.whatsapp.message.media.caption: |-
|
||||
{{#singleAttachment}}
|
||||
{{#content}}
|
||||
{{{ content }}}
|
||||
{{/content}}
|
||||
{{/singleAttachment}}
|
||||
|
||||
whatsapp.to.chatwoot.message: |
|
||||
whatsapp.to.chatwoot.message: |-
|
||||
{{{payload.body}}}
|
||||
|
||||
whatsapp.to.chatwoot.message.contacts: |
|
||||
whatsapp.to.chatwoot.message.contacts: |-
|
||||
👤 **Надісланий контакт(и)**
|
||||
|
||||
{{#contacts}}
|
||||
@@ -211,12 +231,24 @@ whatsapp.to.chatwoot.message.contacts: |
|
||||
|
||||
{{/contacts}}
|
||||
|
||||
whatsapp.to.chatwoot.message.location: |
|
||||
whatsapp.to.chatwoot.message.location: |-
|
||||
{{#message}}
|
||||
{{#locationMessage}}
|
||||
📍 **Надіслана локація**
|
||||
|
||||
https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#name}}
|
||||
**{{name}}**
|
||||
{{/name}}
|
||||
|
||||
{{#address}}
|
||||
📍 **Адреса:** {{address}}
|
||||
{{/address}}
|
||||
|
||||
{{#url}}
|
||||
🌐 **Вебсайт:** {{url}}
|
||||
{{/url}}
|
||||
|
||||
🔗 **Переглянути на карті:** https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#caption}}{{caption}}{{/caption}}
|
||||
{{/locationMessage}}
|
||||
|
||||
@@ -224,13 +256,127 @@ whatsapp.to.chatwoot.message.location: |
|
||||
📍📡 **Надсилання геолокації в реальному часі**
|
||||
Відкрийте **WhatsApp**, щоб побачити оновлення в реальному часі.
|
||||
|
||||
https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#name}}
|
||||
**{{name}}**
|
||||
{{/name}}
|
||||
|
||||
{{#address}}
|
||||
📍 **Адреса:** {{address}}
|
||||
{{/address}}
|
||||
|
||||
{{#url}}
|
||||
🌐 **Вебсайт:** {{url}}
|
||||
{{/url}}
|
||||
|
||||
🔗 **Переглянути на карті:** https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#caption}}{{caption}}{{/caption}}
|
||||
{{/liveLocationMessage}}
|
||||
{{/message}}
|
||||
|
||||
whatsapp.to.chatwoot.message.unsupported: |
|
||||
whatsapp.to.chatwoot.message.poll: |-
|
||||
{{#poll}}
|
||||
📊 **Опитування**
|
||||
|
||||
**{{name}}**
|
||||
{{#options}}
|
||||
- {{optionName}}
|
||||
{{/options}}
|
||||
{{/poll}}
|
||||
|
||||
whatsapp.to.chatwoot.message.list: |-
|
||||
{{#message.listMessage}}
|
||||
{{#title}}
|
||||
*{{{title}}}*
|
||||
{{/title}}
|
||||
{{#description}}
|
||||
{{{description}}}
|
||||
{{/description}}
|
||||
{{#footerText}}
|
||||
{{{footerText}}}
|
||||
{{/footerText}}
|
||||
|
||||
{{#buttonText}}
|
||||
{{{buttonText}}}
|
||||
{{/buttonText}}
|
||||
{{#sections}}
|
||||
{{#title}}
|
||||
{{{title}}}:
|
||||
{{/title}}
|
||||
{{#rows}}
|
||||
{{#title}}
|
||||
- {{{title}}}
|
||||
{{/title}}
|
||||
{{/rows}}
|
||||
|
||||
{{/sections}}
|
||||
{{/message.listMessage}}
|
||||
|
||||
whatsapp.to.chatwoot.message.event: |-
|
||||
{{#message}}
|
||||
{{#eventMessage}}
|
||||
📅 **Подія**
|
||||
|
||||
**{{name}}**
|
||||
{{#description}}
|
||||
{{description}}
|
||||
{{/description}}
|
||||
|
||||
{{#location.name}}
|
||||
📍 **Місце:** {{location.name}}
|
||||
{{/location.name}}
|
||||
{{#startTime}}
|
||||
🕐 **Початок:** {{startTime}}
|
||||
{{/startTime}}
|
||||
{{#endTime}}
|
||||
🕐 **Завершення:** {{endTime}}
|
||||
{{/endTime}}
|
||||
{{#joinLink}}
|
||||
🔗 **Посилання для приєднання:** [{{joinLink}}]({{joinLink}})
|
||||
{{/joinLink}}
|
||||
{{/eventMessage}}
|
||||
{{/message}}
|
||||
|
||||
whatsapp.to.chatwoot.message.pix: |-
|
||||
💳 **PIX - Копіювати та Вставити**
|
||||
|
||||
{{#pixData}}
|
||||
{{#merchantName}}
|
||||
**{{merchantName}}**
|
||||
{{/merchantName}}
|
||||
|
||||
{{#key}}
|
||||
**Ключ PIX:** {{key}}
|
||||
{{/key}}
|
||||
{{#keyType}}
|
||||
**Тип:** {{keyType}}
|
||||
{{/keyType}}
|
||||
{{#totalAmount}}
|
||||
**Сума:** {{totalAmountFormatted}}
|
||||
{{/totalAmount}}
|
||||
{{#referenceId}}
|
||||
**Референс:** {{referenceId}}
|
||||
{{/referenceId}}
|
||||
|
||||
💳 **PIX Копіювати та Вставити надіслано**
|
||||
{{/pixData}}
|
||||
|
||||
whatsapp.to.chatwoot.message.unsupported: |-
|
||||
⚠️ **Цей тип повідомлення не підтримується в ChatWoot.**
|
||||
📱 Будь ласка, відкрийте **WhatsApp**, щоб переглянути.
|
||||
|
||||
Подробиці: [{{{details.text}}}]({{{details.url}}})
|
||||
|
||||
whatsapp.to.chatwoot.message.facebook.ad: |-
|
||||
📢 **РЕКЛАМА FACEBOOK**
|
||||
|
||||
**Заголовок:** {{{adData.title}}}
|
||||
|
||||
**Опис:**
|
||||
{{{adData.body}}}
|
||||
|
||||
**Посилання на рекламу:** [Переглянути у Facebook]({{{adData.sourceUrl}}})
|
||||
**Ідентифікатор реклами:** {{{adData.sourceId}}}
|
||||
|
||||
---
|
||||
💬 **Повідомлення клієнта:**
|
||||
{{{payload.body}}}
|
||||
@@ -1,9 +1,29 @@
|
||||
# Urdu translations for ChatWoot integration
|
||||
locale.name: '🇵🇰 اردو (Urdu)'
|
||||
app.inbox.contact.name: 'واٹس ایپ انٹیگریشن (WAHA)'
|
||||
|
||||
# بنیادی لوکل کوڈ - یہ ایک معتبر BCP 47 لوکل ہونا چاہیے
|
||||
# https://en.wikipedia.org/wiki/IETF_language_tag
|
||||
# WAHA اسے نمبرز، کرنسی اور تاریخ/وقت کی نمائندگی کے لیے استعمال کرتا ہے۔
|
||||
locale.base: 'ur-PK'
|
||||
|
||||
app.inbox.contact.name: 'واٹس ایپ انٹیگریشن'
|
||||
app.inbox.contact.avatar.url: 'https://raw.githubusercontent.com/devlikeapro/waha/core/logo.png'
|
||||
|
||||
job.report.error: |
|
||||
# date.toLocaleString کی "options"
|
||||
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options
|
||||
datetime:
|
||||
locales: ur-PK
|
||||
day: 2-digit
|
||||
month: 2-digit
|
||||
year: numeric
|
||||
hour: 2-digit
|
||||
minute: 2-digit
|
||||
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#timezonename
|
||||
timeZoneName: shortGeneric
|
||||
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
# timeZone: 'Asia/Karachi'
|
||||
|
||||
job.report.error: |-
|
||||
⚠️ **{{{header}}}**
|
||||
{{#attempts.nextDelay}}
|
||||
🔄 {{attempts.nextDelay}} سیکنڈ میں دوبارہ کوشش کر رہا ہے...
|
||||
@@ -20,7 +40,7 @@ job.report.error: |
|
||||
```
|
||||
{{/error}}
|
||||
|
||||
job.report.succeeded: |
|
||||
job.report.succeeded: |-
|
||||
✅ **کامیاب ہوا**
|
||||
کوشش: {{{attempts.current}}} / {{{attempts.max}}}
|
||||
تفصیلات: [{{{details.text}}}]({{{details.url}}})
|
||||
@@ -30,33 +50,33 @@ whatsapp.message.receiving.error: واٹس ایپ سے پیغام موصول ن
|
||||
whatsapp.message.removing.error: واٹس ایپ سے پیغام ہٹا نہیں سکا
|
||||
job.scheduled.error.header: شیڈول کردہ کام انجام دینے میں ناکام رہا
|
||||
|
||||
message.from.whatsapp: |
|
||||
message.from.whatsapp: |-
|
||||
{{{text}}}
|
||||
|
||||
📱 *واٹس ایپ سے بھیجا گیا*
|
||||
|
||||
message.from.api: |
|
||||
message.from.api: |-
|
||||
{{{text}}}
|
||||
|
||||
📱 *API کے ذریعے بھیجا گیا*
|
||||
|
||||
message.removed.in.whatsapp: |
|
||||
message.removed.in.whatsapp: |-
|
||||
❌ *یہ پیغام واٹس ایپ میں حذف کر دیا گیا تھا*
|
||||
|
||||
message.edited.in.whatsapp: |
|
||||
message.edited.in.whatsapp: |-
|
||||
{{{text}}}
|
||||
|
||||
✏️ *واٹس ایپ میں ترمیم کی گئی*
|
||||
|
||||
whatsapp.group.message: |
|
||||
{{{text}}}
|
||||
|
||||
whatsapp.group.message: |-
|
||||
👥 *{{{participant}}}*
|
||||
|
||||
whatsapp.reaction.added: |
|
||||
{{{text}}}
|
||||
|
||||
whatsapp.reaction.added: |-
|
||||
*ردعمل دیا* {{{emoji}}}
|
||||
|
||||
whatsapp.reaction.removed: |
|
||||
whatsapp.reaction.removed: |-
|
||||
*ردعمل ہٹا دیا گیا*
|
||||
|
||||
whatsapp.contact.group.suffix: 'گروپ'
|
||||
@@ -65,7 +85,7 @@ whatsapp.contact.broadcast.suffix: 'براڈکاسٹ فہرست'
|
||||
# Aka Stories
|
||||
whatsapp.contact.status.name: 'سٹیٹس'
|
||||
|
||||
app.connected.message: |
|
||||
app.connected.message: |-
|
||||
🔗 **منسلک: واٹس ایپ سیشن ChatWoot انبکس سے**
|
||||
|
||||
✅ واٹس ایپ سیشن **{{{name}}}** کامیابی سے اس ChatWoot انبکس سے منسلک ہو گیا ہے۔
|
||||
@@ -83,7 +103,7 @@ app.connected.message: |
|
||||
|
||||
آئیے شروع کریں! 🚀
|
||||
|
||||
app.disconnected.message: |
|
||||
app.disconnected.message: |-
|
||||
🔌 **منقطع: واٹس ایپ سیشن ChatWoot انبکس سے**
|
||||
|
||||
❌ واٹس ایپ سیشن **{{{name}}}** اس ChatWoot انبکس سے منقطع ہو گیا ہے۔
|
||||
@@ -92,12 +112,12 @@ app.disconnected.message: |
|
||||
|
||||
دوبارہ منسلک ہونے کے لیے، براہ کرم اپنے منتظم سے رابطہ کریں۔
|
||||
|
||||
app.updated.message: |
|
||||
app.updated.message: |-
|
||||
🔄 **اپڈیٹ شدہ: واٹس ایپ سیشن کی ترتیبات**
|
||||
|
||||
✅ واٹس ایپ سیشن **{{{name}}}** کی ترتیبات اپڈیٹ کر دی گئی ہیں۔
|
||||
|
||||
app.commands.list: |
|
||||
app.commands.list: |-
|
||||
آپ درج ذیل کمانڈز میں سے ایک بھیج کر **واٹس ایپ انٹیگریشن** کا انتظام کر سکتے ہیں:
|
||||
|
||||
🖥️ **سیشن**:
|
||||
@@ -125,32 +145,32 @@ app.commands.server.disabled: ⛔ **سرور کمانڈز غیر فعال ہیں
|
||||
|
||||
دستیاب کمانڈز کی فہرست حاصل کرنے کے لیے **help** بھیجیں۔
|
||||
|
||||
app.help.reminder: |
|
||||
app.help.reminder: |-
|
||||
دستیاب کمانڈز کی فہرست حاصل کرنے کے لیے **help** بھیجیں۔
|
||||
|
||||
app.session.status.change: |
|
||||
app.session.status.change: |-
|
||||
{{{emoji}}} "{{{session}}}" سیشن {{{status}}} حالت میں تبدیل ہو گیا
|
||||
|
||||
app.session.current.status: |
|
||||
app.session.current.status: |-
|
||||
{{{emoji}}} **{{{session}}}** سیشن کی حالت **{{{status}}}** میں ہے
|
||||
**واٹس ایپ اکاؤنٹ:**
|
||||
|
||||
📱 **{{{name}}} ({{{id}}})**
|
||||
|
||||
app.session.status.working: |
|
||||
app.session.status.working: |-
|
||||
✅ یہ ChatWoot انبکس **واٹس ایپ اکاؤنٹ** سے منسلک ہے اور پیغامات بھیجنے اور موصول کرنے کے لیے تیار ہے!
|
||||
|
||||
📱 **{{{name}}} ({{{id}}})**
|
||||
|
||||
app.session.status.error: |
|
||||
app.session.status.error: |-
|
||||
⚠️ **یہ ChatWoot انبکس واٹس ایپ اکاؤنٹ سے منسلک ہے لیکن پیغامات بھیجنے اور موصول کرنے کے لیے تیار نہیں ہے!**
|
||||
|
||||
براہ کرم سیشن کی حالت چیک کریں اور اسے دوبارہ شروع کرنے کی کوشش کریں یا لاگ آؤٹ کریں اور QR کوڈ دوبارہ اسکین کریں۔
|
||||
|
||||
app.session.scan.qr.code: |
|
||||
app.session.scan.qr.code: |-
|
||||
⚠️ **اس ChatWoot انبکس کے ساتھ واٹس ایپ اکاؤنٹ کو منسلک کرنے کے لیے اپنے فون پر QR کوڈ اسکین کریں!**
|
||||
|
||||
app.server.version.and.status: |
|
||||
app.server.version.and.status: |-
|
||||
**ورژن:**
|
||||
```
|
||||
{{{version}}}
|
||||
@@ -161,16 +181,16 @@ app.server.version.and.status: |
|
||||
{{{status}}}
|
||||
```
|
||||
|
||||
app.server.reboot: |
|
||||
app.server.reboot: |-
|
||||
سرور آرام سے دوبارہ شروع ہو رہا ہے...
|
||||
|
||||
app.server.reboot.force: |
|
||||
app.server.reboot.force: |-
|
||||
سرور زبردستی دوبارہ شروع ہو رہا ہے...
|
||||
|
||||
app.logout.success: |
|
||||
app.logout.success: |-
|
||||
✅ اکاؤنٹ کامیابی سے غیر مجاز ہو گیا!
|
||||
|
||||
waha.new.version.available: |
|
||||
waha.new.version.available: |-
|
||||
🔄 **نیا ورژن دستیاب ہے!**
|
||||
|
||||
موجودہ ورژن: **{{{currentVersion}}}**
|
||||
@@ -178,7 +198,7 @@ waha.new.version.available: |
|
||||
|
||||
👉 [**🆕 تبدیلیوں کی فہرست**]({{{changelogUrl}}}) میں نیا کیا ہے دیکھیں
|
||||
|
||||
waha.core.version.used: |
|
||||
waha.core.version.used: |-
|
||||
❤️ **WAHA کی حمایت کریں!**
|
||||
|
||||
آپ مفت **WAHA Core** ورژن استعمال کر رہے ہیں۔ اگر آپ کو یہ پروجیکٹ مفید لگتا ہے، تو براہ کرم اس کی ترقی کی حمایت کرنے پر غور کریں۔
|
||||
@@ -187,20 +207,20 @@ waha.core.version.used: |
|
||||
|
||||
[**🎁 ہماری حمایت کریں**]({{{supportUrl}}})
|
||||
|
||||
chatwoot.to.whatsapp.message.text: |
|
||||
chatwoot.to.whatsapp.message.text: |-
|
||||
{{{ content }}}
|
||||
|
||||
chatwoot.to.whatsapp.message.media.caption: |
|
||||
chatwoot.to.whatsapp.message.media.caption: |-
|
||||
{{#singleAttachment}}
|
||||
{{#content}}
|
||||
{{{ content }}}
|
||||
{{/content}}
|
||||
{{/singleAttachment}}
|
||||
|
||||
whatsapp.to.chatwoot.message: |
|
||||
whatsapp.to.chatwoot.message: |-
|
||||
{{{payload.body}}}
|
||||
|
||||
whatsapp.to.chatwoot.message.contacts: |
|
||||
whatsapp.to.chatwoot.message.contacts: |-
|
||||
👤 **شیئر کیے گئے رابطہ(رابطے)**
|
||||
|
||||
{{#contacts}}
|
||||
@@ -211,12 +231,24 @@ whatsapp.to.chatwoot.message.contacts: |
|
||||
|
||||
{{/contacts}}
|
||||
|
||||
whatsapp.to.chatwoot.message.location: |
|
||||
whatsapp.to.chatwoot.message.location: |-
|
||||
{{#message}}
|
||||
{{#locationMessage}}
|
||||
📍 **شیئر کی گئی لوکیشن**
|
||||
|
||||
https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#name}}
|
||||
**{{name}}**
|
||||
{{/name}}
|
||||
|
||||
{{#address}}
|
||||
📍 **پتہ:** {{address}}
|
||||
{{/address}}
|
||||
|
||||
{{#url}}
|
||||
🌐 **ویب سائٹ:** {{url}}
|
||||
{{/url}}
|
||||
|
||||
🔗 **نقشے پر دیکھیں:** https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#caption}}{{caption}}{{/caption}}
|
||||
{{/locationMessage}}
|
||||
|
||||
@@ -224,13 +256,127 @@ whatsapp.to.chatwoot.message.location: |
|
||||
📍📡 **لائیو لوکیشن شیئر کی جا رہی ہے**
|
||||
حقیقی وقت کی تازہ کاریوں کے لیے **WhatsApp** کھولیں۔
|
||||
|
||||
https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#name}}
|
||||
**{{name}}**
|
||||
{{/name}}
|
||||
|
||||
{{#address}}
|
||||
📍 **پتہ:** {{address}}
|
||||
{{/address}}
|
||||
|
||||
{{#url}}
|
||||
🌐 **ویب سائٹ:** {{url}}
|
||||
{{/url}}
|
||||
|
||||
🔗 **نقشے پر دیکھیں:** https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#caption}}{{caption}}{{/caption}}
|
||||
{{/liveLocationMessage}}
|
||||
{{/message}}
|
||||
|
||||
whatsapp.to.chatwoot.message.unsupported: |
|
||||
whatsapp.to.chatwoot.message.poll: |-
|
||||
{{#poll}}
|
||||
📊 **رائے شماری**
|
||||
|
||||
**{{name}}**
|
||||
{{#options}}
|
||||
- {{optionName}}
|
||||
{{/options}}
|
||||
{{/poll}}
|
||||
|
||||
whatsapp.to.chatwoot.message.list: |-
|
||||
{{#message.listMessage}}
|
||||
{{#title}}
|
||||
*{{{title}}}*
|
||||
{{/title}}
|
||||
{{#description}}
|
||||
{{{description}}}
|
||||
{{/description}}
|
||||
{{#footerText}}
|
||||
{{{footerText}}}
|
||||
{{/footerText}}
|
||||
|
||||
{{#buttonText}}
|
||||
{{{buttonText}}}
|
||||
{{/buttonText}}
|
||||
{{#sections}}
|
||||
{{#title}}
|
||||
{{{title}}}:
|
||||
{{/title}}
|
||||
{{#rows}}
|
||||
{{#title}}
|
||||
- {{{title}}}
|
||||
{{/title}}
|
||||
{{/rows}}
|
||||
|
||||
{{/sections}}
|
||||
{{/message.listMessage}}
|
||||
|
||||
whatsapp.to.chatwoot.message.event: |-
|
||||
{{#message}}
|
||||
{{#eventMessage}}
|
||||
📅 **ایونٹ**
|
||||
|
||||
**{{name}}**
|
||||
{{#description}}
|
||||
{{description}}
|
||||
{{/description}}
|
||||
|
||||
{{#location.name}}
|
||||
📍 **مقام:** {{location.name}}
|
||||
{{/location.name}}
|
||||
{{#startTime}}
|
||||
🕐 **آغاز:** {{startTime}}
|
||||
{{/startTime}}
|
||||
{{#endTime}}
|
||||
🕐 **اختتام:** {{endTime}}
|
||||
{{/endTime}}
|
||||
{{#joinLink}}
|
||||
🔗 **شمولیت کا لنک:** [{{joinLink}}]({{joinLink}})
|
||||
{{/joinLink}}
|
||||
{{/eventMessage}}
|
||||
{{/message}}
|
||||
|
||||
whatsapp.to.chatwoot.message.pix: |-
|
||||
💳 **PIX - کاپی اور پیسٹ**
|
||||
|
||||
{{#pixData}}
|
||||
{{#merchantName}}
|
||||
**{{merchantName}}**
|
||||
{{/merchantName}}
|
||||
|
||||
{{#key}}
|
||||
**PIX کلید:** {{key}}
|
||||
{{/key}}
|
||||
{{#keyType}}
|
||||
**قسم:** {{keyType}}
|
||||
{{/keyType}}
|
||||
{{#totalAmount}}
|
||||
**رقم:** {{totalAmountFormatted}}
|
||||
{{/totalAmount}}
|
||||
{{#referenceId}}
|
||||
**حوالہ:** {{referenceId}}
|
||||
{{/referenceId}}
|
||||
|
||||
💳 **PIX کاپی اور پیسٹ بھیج دیا گیا**
|
||||
{{/pixData}}
|
||||
|
||||
whatsapp.to.chatwoot.message.unsupported: |-
|
||||
⚠️ **ChatWoot میں اس قسم کا پیغام معاونت یافتہ نہیں ہے۔**
|
||||
📱 اسے دیکھنے کے لیے براہ کرم **WhatsApp** کھولیں۔
|
||||
|
||||
تفصیلات: [{{{details.text}}}]({{{details.url}}})
|
||||
|
||||
whatsapp.to.chatwoot.message.facebook.ad: |-
|
||||
📢 **فیس بک اشتہار**
|
||||
|
||||
**عنوان:** {{{adData.title}}}
|
||||
|
||||
**تفصیل:**
|
||||
{{{adData.body}}}
|
||||
|
||||
**اشتہار کا لنک:** [فیس بک پر دیکھیں]({{{adData.sourceUrl}}})
|
||||
**اشتہار کا شناختی نمبر:** {{{adData.sourceId}}}
|
||||
|
||||
---
|
||||
💬 **گاہک کا پیغام:**
|
||||
{{{payload.body}}}
|
||||
@@ -1,9 +1,29 @@
|
||||
# Simplified Chinese translations for ChatWoot integration
|
||||
locale.name: '🇨🇳 中文(Simplified Chinese)'
|
||||
|
||||
# 基础语言代码 - 必须是有效的 BCP 47 语言区域
|
||||
# https://en.wikipedia.org/wiki/IETF_language_tag
|
||||
# WAHA 使用它来格式化数字、货币和日期时间。
|
||||
locale.base: 'zh-CN'
|
||||
|
||||
app.inbox.contact.name: 'WhatsApp 集成(WAHA)'
|
||||
app.inbox.contact.avatar.url: 'https://raw.githubusercontent.com/devlikeapro/waha/core/logo.png'
|
||||
|
||||
job.report.error: |
|
||||
# date.toLocaleString 的 "options"
|
||||
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options
|
||||
datetime:
|
||||
locales: zh-CN
|
||||
day: 2-digit
|
||||
month: 2-digit
|
||||
year: numeric
|
||||
hour: 2-digit
|
||||
minute: 2-digit
|
||||
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#timezonename
|
||||
timeZoneName: shortGeneric
|
||||
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
# timeZone: 'Asia/Shanghai'
|
||||
|
||||
job.report.error: |-
|
||||
⚠️ **{{{header}}}**
|
||||
{{#attempts.nextDelay}}
|
||||
🔄 将在 {{attempts.nextDelay}} 秒后重试...
|
||||
@@ -20,7 +40,7 @@ job.report.error: |
|
||||
```
|
||||
{{/error}}
|
||||
|
||||
job.report.succeeded: |
|
||||
job.report.succeeded: |-
|
||||
✅ **成功**
|
||||
尝试:{{{attempts.current}}} / {{{attempts.max}}}
|
||||
详情:[{{{details.text}}}]({{{details.url}}})
|
||||
@@ -30,33 +50,33 @@ whatsapp.message.receiving.error: 无法接收来自 WhatsApp 的消息
|
||||
whatsapp.message.removing.error: 无法从 WhatsApp 中删除消息
|
||||
job.scheduled.error.header: 计划任务执行失败
|
||||
|
||||
message.from.whatsapp: |
|
||||
message.from.whatsapp: |-
|
||||
{{{text}}}
|
||||
|
||||
📱 *通过 WhatsApp 发送*
|
||||
|
||||
message.from.api: |
|
||||
message.from.api: |-
|
||||
{{{text}}}
|
||||
|
||||
📱 *通过 API 发送*
|
||||
|
||||
message.removed.in.whatsapp: |
|
||||
message.removed.in.whatsapp: |-
|
||||
❌ *此消息已在 WhatsApp 中被删除*
|
||||
|
||||
message.edited.in.whatsapp: |
|
||||
message.edited.in.whatsapp: |-
|
||||
{{{text}}}
|
||||
|
||||
✏️ *已在 WhatsApp 中编辑*
|
||||
|
||||
whatsapp.group.message: |
|
||||
{{{text}}}
|
||||
|
||||
whatsapp.group.message: |-
|
||||
👥 *{{{participant}}}*
|
||||
|
||||
whatsapp.reaction.added: |
|
||||
{{{text}}}
|
||||
|
||||
whatsapp.reaction.added: |-
|
||||
*已反应* {{{emoji}}}
|
||||
|
||||
whatsapp.reaction.removed: |
|
||||
whatsapp.reaction.removed: |-
|
||||
*已移除反应*
|
||||
|
||||
whatsapp.contact.group.suffix: '群组'
|
||||
@@ -65,7 +85,7 @@ whatsapp.contact.broadcast.suffix: '广播列表'
|
||||
# Aka Stories
|
||||
whatsapp.contact.status.name: '状态'
|
||||
|
||||
app.connected.message: |
|
||||
app.connected.message: |-
|
||||
🔗 **已连接:WhatsApp 会话到 ChatWoot 收件箱**
|
||||
|
||||
✅ WhatsApp 会话 **{{{name}}}** 已成功连接到此 ChatWoot 收件箱。
|
||||
@@ -83,7 +103,7 @@ app.connected.message: |
|
||||
|
||||
开始吧!🚀
|
||||
|
||||
app.disconnected.message: |
|
||||
app.disconnected.message: |-
|
||||
🔌 **已断开:从 ChatWoot 收件箱断开 WhatsApp 会话**
|
||||
|
||||
❌ WhatsApp 会话 **{{{name}}}** 已与此 ChatWoot 收件箱断开。
|
||||
@@ -92,12 +112,12 @@ app.disconnected.message: |
|
||||
|
||||
如需重新连接,请联系你的管理员。
|
||||
|
||||
app.updated.message: |
|
||||
app.updated.message: |-
|
||||
🔄 **已更新:WhatsApp 会话设置**
|
||||
|
||||
✅ WhatsApp 会话 **{{{name}}}** 的设置已更新。
|
||||
|
||||
app.commands.list: |
|
||||
app.commands.list: |-
|
||||
你可以通过发送以下命令来管理**WhatsApp 集成**:
|
||||
|
||||
🖥️ **会话**:
|
||||
@@ -127,32 +147,32 @@ app.commands.server.disabled: ⛔ **服务器命令已禁用**。
|
||||
|
||||
发送 **help** 获取可用命令列表。
|
||||
|
||||
app.help.reminder: |
|
||||
app.help.reminder: |-
|
||||
发送 **help** 获取可用命令列表。
|
||||
|
||||
app.session.status.change: |
|
||||
app.session.status.change: |-
|
||||
{{{emoji}}} "{{{session}}}" 会话已切换为 {{{status}}} 状态
|
||||
|
||||
app.session.current.status: |
|
||||
app.session.current.status: |-
|
||||
{{{emoji}}} **{{{session}}}** 会话状态为 **{{{status}}}**
|
||||
**WhatsApp 账号:**
|
||||
|
||||
📱 **{{{name}}} ({{{id}}})**
|
||||
|
||||
app.session.status.working: |
|
||||
app.session.status.working: |-
|
||||
✅ 此 ChatWoot 收件箱已链接到**WhatsApp 账号**,可以正常收发消息!
|
||||
|
||||
📱 **{{{name}}} ({{{id}}})**
|
||||
|
||||
app.session.status.error: |
|
||||
app.session.status.error: |-
|
||||
⚠️ **此 ChatWoot 收件箱已链接到 WhatsApp 账号,但尚未准备好收发消息!**
|
||||
|
||||
请检查会话状态,尝试重启,或登出后重新扫描二维码。
|
||||
|
||||
app.session.scan.qr.code: |
|
||||
app.session.scan.qr.code: |-
|
||||
⚠️ **请在手机上扫描二维码,将 WhatsApp 账号与此 ChatWoot 收件箱关联!**
|
||||
|
||||
app.server.version.and.status: |
|
||||
app.server.version.and.status: |-
|
||||
**版本:**
|
||||
```
|
||||
{{{version}}}
|
||||
@@ -163,16 +183,16 @@ app.server.version.and.status: |
|
||||
{{{status}}}
|
||||
```
|
||||
|
||||
app.server.reboot: |
|
||||
app.server.reboot: |-
|
||||
服务器正在优雅重启...
|
||||
|
||||
app.server.reboot.force: |
|
||||
app.server.reboot.force: |-
|
||||
服务器正在强制重启...
|
||||
|
||||
app.logout.success: |
|
||||
app.logout.success: |-
|
||||
✅ 账号已成功取消授权!
|
||||
|
||||
waha.new.version.available: |
|
||||
waha.new.version.available: |-
|
||||
🔄 **有新版本可用!**
|
||||
|
||||
当前版本:**{{{currentVersion}}}**
|
||||
@@ -180,7 +200,7 @@ waha.new.version.available: |
|
||||
|
||||
👉 查看[**🆕 更新日志**]({{{changelogUrl}}})
|
||||
|
||||
waha.core.version.used: |
|
||||
waha.core.version.used: |-
|
||||
❤️ **支持 WAHA!**
|
||||
|
||||
你正在使用免费的 **WAHA Core** 版本。如果你觉得该项目有帮助,请考虑支持其开发。
|
||||
@@ -189,20 +209,20 @@ waha.core.version.used: |
|
||||
|
||||
[**🎁 支持我们**]({{{supportUrl}}})
|
||||
|
||||
chatwoot.to.whatsapp.message.text: |
|
||||
chatwoot.to.whatsapp.message.text: |-
|
||||
{{{ content }}}
|
||||
|
||||
chatwoot.to.whatsapp.message.media.caption: |
|
||||
chatwoot.to.whatsapp.message.media.caption: |-
|
||||
{{#singleAttachment}}
|
||||
{{#content}}
|
||||
{{{ content }}}
|
||||
{{/content}}
|
||||
{{/singleAttachment}}
|
||||
|
||||
whatsapp.to.chatwoot.message: |
|
||||
whatsapp.to.chatwoot.message: |-
|
||||
{{{payload.body}}}
|
||||
|
||||
whatsapp.to.chatwoot.message.contacts: |
|
||||
whatsapp.to.chatwoot.message.contacts: |-
|
||||
👤 **共享联系人**
|
||||
|
||||
{{#contacts}}
|
||||
@@ -213,12 +233,24 @@ whatsapp.to.chatwoot.message.contacts: |
|
||||
|
||||
{{/contacts}}
|
||||
|
||||
whatsapp.to.chatwoot.message.location: |
|
||||
whatsapp.to.chatwoot.message.location: |-
|
||||
{{#message}}
|
||||
{{#locationMessage}}
|
||||
📍 **共享位置**
|
||||
|
||||
https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#name}}
|
||||
**{{name}}**
|
||||
{{/name}}
|
||||
|
||||
{{#address}}
|
||||
📍 **地址:** {{address}}
|
||||
{{/address}}
|
||||
|
||||
{{#url}}
|
||||
🌐 **网站:** {{url}}
|
||||
{{/url}}
|
||||
|
||||
🔗 **在地图上查看:** https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#caption}}{{caption}}{{/caption}}
|
||||
{{/locationMessage}}
|
||||
|
||||
@@ -226,13 +258,127 @@ whatsapp.to.chatwoot.message.location: |
|
||||
📍📡 **正在共享实时位置**
|
||||
打开 **WhatsApp** 查看实时更新。
|
||||
|
||||
https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#name}}
|
||||
**{{name}}**
|
||||
{{/name}}
|
||||
|
||||
{{#address}}
|
||||
📍 **地址:** {{address}}
|
||||
{{/address}}
|
||||
|
||||
{{#url}}
|
||||
🌐 **网站:** {{url}}
|
||||
{{/url}}
|
||||
|
||||
🔗 **在地图上查看:** https://www.google.com/maps?q={{degreesLatitude}},{{degreesLongitude}}
|
||||
{{#caption}}{{caption}}{{/caption}}
|
||||
{{/liveLocationMessage}}
|
||||
{{/message}}
|
||||
|
||||
whatsapp.to.chatwoot.message.unsupported: |
|
||||
whatsapp.to.chatwoot.message.poll: |-
|
||||
{{#poll}}
|
||||
📊 **投票**
|
||||
|
||||
**{{name}}**
|
||||
{{#options}}
|
||||
- {{optionName}}
|
||||
{{/options}}
|
||||
{{/poll}}
|
||||
|
||||
whatsapp.to.chatwoot.message.list: |-
|
||||
{{#message.listMessage}}
|
||||
{{#title}}
|
||||
*{{{title}}}*
|
||||
{{/title}}
|
||||
{{#description}}
|
||||
{{{description}}}
|
||||
{{/description}}
|
||||
{{#footerText}}
|
||||
{{{footerText}}}
|
||||
{{/footerText}}
|
||||
|
||||
{{#buttonText}}
|
||||
{{{buttonText}}}
|
||||
{{/buttonText}}
|
||||
{{#sections}}
|
||||
{{#title}}
|
||||
{{{title}}}:
|
||||
{{/title}}
|
||||
{{#rows}}
|
||||
{{#title}}
|
||||
- {{{title}}}
|
||||
{{/title}}
|
||||
{{/rows}}
|
||||
|
||||
{{/sections}}
|
||||
{{/message.listMessage}}
|
||||
|
||||
whatsapp.to.chatwoot.message.event: |-
|
||||
{{#message}}
|
||||
{{#eventMessage}}
|
||||
📅 **活动**
|
||||
|
||||
**{{name}}**
|
||||
{{#description}}
|
||||
{{description}}
|
||||
{{/description}}
|
||||
|
||||
{{#location.name}}
|
||||
📍 **地点:** {{location.name}}
|
||||
{{/location.name}}
|
||||
{{#startTime}}
|
||||
🕐 **开始时间:** {{startTime}}
|
||||
{{/startTime}}
|
||||
{{#endTime}}
|
||||
🕐 **结束时间:** {{endTime}}
|
||||
{{/endTime}}
|
||||
{{#joinLink}}
|
||||
🔗 **加入链接:** [{{joinLink}}]({{joinLink}})
|
||||
{{/joinLink}}
|
||||
{{/eventMessage}}
|
||||
{{/message}}
|
||||
|
||||
whatsapp.to.chatwoot.message.pix: |-
|
||||
💳 **PIX - 复制粘贴**
|
||||
|
||||
{{#pixData}}
|
||||
{{#merchantName}}
|
||||
**{{merchantName}}**
|
||||
{{/merchantName}}
|
||||
|
||||
{{#key}}
|
||||
**PIX 密钥:** {{key}}
|
||||
{{/key}}
|
||||
{{#keyType}}
|
||||
**类型:** {{keyType}}
|
||||
{{/keyType}}
|
||||
{{#totalAmount}}
|
||||
**金额:** {{totalAmountFormatted}}
|
||||
{{/totalAmount}}
|
||||
{{#referenceId}}
|
||||
**参考:** {{referenceId}}
|
||||
{{/referenceId}}
|
||||
|
||||
💳 **PIX 复制粘贴已发送**
|
||||
{{/pixData}}
|
||||
|
||||
whatsapp.to.chatwoot.message.unsupported: |-
|
||||
⚠️ **ChatWoot 不支持此消息类型。**
|
||||
📱 请打开 **WhatsApp** 查看。
|
||||
|
||||
详情: [{{{details.text}}}]({{{details.url}}})
|
||||
|
||||
whatsapp.to.chatwoot.message.facebook.ad: |-
|
||||
📢 **Facebook 广告**
|
||||
|
||||
**标题:** {{{adData.title}}}
|
||||
|
||||
**描述:**
|
||||
{{{adData.body}}}
|
||||
|
||||
**广告链接:** [在 Facebook 查看]({{{adData.sourceUrl}}})
|
||||
**广告 ID:** {{{adData.sourceId}}}
|
||||
|
||||
---
|
||||
💬 **客户消息:**
|
||||
{{{payload.body}}}
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { proto } from '@adiwajshing/baileys';
|
||||
import { ChatWootCommandsConfig } from '@waha/apps/chatwoot/dto/config.dto';
|
||||
import { WAMessage } from '@waha/structures/responses.dto';
|
||||
import { proto } from '@adiwajshing/baileys';
|
||||
import { SimpleVCardInfo } from '@waha/core/vcard';
|
||||
|
||||
export enum TKey {
|
||||
@@ -51,7 +51,12 @@ export enum TKey {
|
||||
WA_TO_CW_MESSAGE = 'whatsapp.to.chatwoot.message',
|
||||
WA_TO_CW_MESSAGE_CONTACTS = 'whatsapp.to.chatwoot.message.contacts',
|
||||
WA_TO_CW_MESSAGE_LOCATION = 'whatsapp.to.chatwoot.message.location',
|
||||
WA_TO_CW_MESSAGE_POLL = 'whatsapp.to.chatwoot.message.poll',
|
||||
WA_TO_CW_MESSAGE_EVENT = 'whatsapp.to.chatwoot.message.event',
|
||||
WA_TO_CW_MESSAGE_PIX = 'whatsapp.to.chatwoot.message.pix',
|
||||
WA_TO_CW_MESSAGE_UNSUPPORTED = 'whatsapp.to.chatwoot.message.unsupported',
|
||||
WA_TO_CW_MESSAGE_FACEBOOK_AD = 'whatsapp.to.chatwoot.message.facebook.ad',
|
||||
WA_TO_CW_MESSAGE_LIST = 'whatsapp.to.chatwoot.message.list',
|
||||
|
||||
//
|
||||
// App Inbox
|
||||
@@ -99,6 +104,34 @@ interface Link {
|
||||
url: string;
|
||||
}
|
||||
|
||||
export interface FacebookAdTemplateData {
|
||||
title: string;
|
||||
body: string;
|
||||
thumbnailUrl: string;
|
||||
originalImageUrl: string;
|
||||
sourceUrl: string;
|
||||
sourceId: string;
|
||||
}
|
||||
|
||||
export interface PollOption {
|
||||
optionName?: string;
|
||||
}
|
||||
|
||||
export interface PollCreationMessage {
|
||||
name?: string;
|
||||
options?: Array<PollOption>;
|
||||
}
|
||||
|
||||
export interface PixTemplatePayload {
|
||||
merchantName?: string;
|
||||
key?: string;
|
||||
keyType?: string;
|
||||
currency?: string;
|
||||
totalAmount?: number;
|
||||
totalAmountFormatted?: string;
|
||||
referenceId?: string;
|
||||
}
|
||||
|
||||
export type TemplatePayloads = {
|
||||
[TKey.LOCALE_NAME]: void;
|
||||
[TKey.APP_INBOX_CONTACT_NAME]: void;
|
||||
@@ -131,7 +164,31 @@ export type TemplatePayloads = {
|
||||
};
|
||||
[TKey.WA_TO_CW_MESSAGE_CONTACTS]: { contacts: SimpleVCardInfo[] };
|
||||
[TKey.WA_TO_CW_MESSAGE_LOCATION]: { payload: any; message: proto.Message };
|
||||
[TKey.WA_TO_CW_MESSAGE_POLL]: {
|
||||
payload: WAMessage;
|
||||
poll: PollCreationMessage;
|
||||
message: proto.Message;
|
||||
};
|
||||
[TKey.WA_TO_CW_MESSAGE_EVENT]: {
|
||||
payload: WAMessage;
|
||||
message: {
|
||||
eventMessage: Record<string, unknown>;
|
||||
};
|
||||
};
|
||||
[TKey.WA_TO_CW_MESSAGE_LIST]: {
|
||||
payload: WAMessage;
|
||||
message: proto.Message;
|
||||
};
|
||||
[TKey.WA_TO_CW_MESSAGE_PIX]: {
|
||||
payload: WAMessage;
|
||||
message: proto.Message | null;
|
||||
pixData: PixTemplatePayload;
|
||||
};
|
||||
[TKey.WA_TO_CW_MESSAGE_UNSUPPORTED]: { details: Link };
|
||||
[TKey.WA_TO_CW_MESSAGE_FACEBOOK_AD]: {
|
||||
payload: WAMessage;
|
||||
adData: FacebookAdTemplateData;
|
||||
};
|
||||
[TKey.JOB_SCHEDULED_ERROR_HEADER]: void;
|
||||
[TKey.JOB_REPORT_ERROR]: {
|
||||
header: string;
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
import { ChatWootMessagePartial } from '@waha/apps/chatwoot/consumers/waha/base';
|
||||
import { Locale } from '@waha/apps/chatwoot/i18n/locale';
|
||||
import { TKey } from '@waha/apps/chatwoot/i18n/templates';
|
||||
import { MessageToChatWootConverter } from '@waha/apps/chatwoot/messages/to/chatwoot';
|
||||
import { isEmptyString } from '@waha/apps/chatwoot/messages/to/chatwoot/utils/proto';
|
||||
import { WhatsappToMarkdown } from '@waha/apps/chatwoot/messages/to/chatwoot/utils/markdown';
|
||||
import type { proto } from '@adiwajshing/baileys';
|
||||
import { WAMessage } from '@waha/structures/responses.dto';
|
||||
|
||||
export class EventMessage implements MessageToChatWootConverter {
|
||||
constructor(private readonly l: Locale) {}
|
||||
|
||||
convert(
|
||||
payload: WAMessage,
|
||||
protoMessage: proto.Message | null,
|
||||
): ChatWootMessagePartial | null {
|
||||
const eventMessage = protoMessage?.eventMessage;
|
||||
if (!eventMessage) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const formattedEventMessage = {
|
||||
...eventMessage,
|
||||
startTime: this.l.FormatTimestamp(eventMessage.startTime),
|
||||
endTime: this.l.FormatTimestamp(eventMessage.endTime),
|
||||
};
|
||||
|
||||
const content = this.l.key(TKey.WA_TO_CW_MESSAGE_EVENT).r({
|
||||
payload,
|
||||
message: {
|
||||
eventMessage: formattedEventMessage,
|
||||
},
|
||||
});
|
||||
|
||||
if (isEmptyString(content)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return {
|
||||
content: WhatsappToMarkdown(content),
|
||||
attachments: [],
|
||||
private: undefined,
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
import { ILogger } from '@waha/apps/app_sdk/ILogger';
|
||||
import { SendAttachment } from '@waha/apps/chatwoot/client/types';
|
||||
import { ChatWootMessagePartial } from '@waha/apps/chatwoot/consumers/waha/base';
|
||||
import { Locale } from '@waha/apps/chatwoot/i18n/locale';
|
||||
import {
|
||||
FacebookAdTemplateData,
|
||||
TKey,
|
||||
} from '@waha/apps/chatwoot/i18n/templates';
|
||||
import { MessageToChatWootConverter } from '@waha/apps/chatwoot/messages/to/chatwoot';
|
||||
import { WhatsappToMarkdown } from '@waha/apps/chatwoot/messages/to/chatwoot/utils/markdown';
|
||||
import { WAMessage } from '@waha/structures/responses.dto';
|
||||
import type { proto } from '@adiwajshing/baileys';
|
||||
import * as lodash from 'lodash';
|
||||
|
||||
import { fetchBuffer } from '@waha/utils/fetch';
|
||||
|
||||
export class FacebookAdMessage implements MessageToChatWootConverter {
|
||||
constructor(
|
||||
private readonly locale: Locale,
|
||||
private readonly logger: ILogger,
|
||||
) {}
|
||||
|
||||
async convert(
|
||||
payload: WAMessage,
|
||||
protoMessage: proto.Message | null,
|
||||
): Promise<ChatWootMessagePartial | null> {
|
||||
const adData = this.extractAdData(protoMessage);
|
||||
if (!adData) {
|
||||
return null;
|
||||
}
|
||||
const content = this.locale.key(TKey.WA_TO_CW_MESSAGE_FACEBOOK_AD).render({
|
||||
payload,
|
||||
adData,
|
||||
});
|
||||
const attachments = await this.getAttachments(adData);
|
||||
|
||||
return {
|
||||
content: WhatsappToMarkdown(content),
|
||||
attachments,
|
||||
private: undefined,
|
||||
};
|
||||
}
|
||||
|
||||
private extractAdData(protoMessage: proto.Message): FacebookAdTemplateData {
|
||||
if (
|
||||
lodash.isEmpty(
|
||||
protoMessage?.extendedTextMessage?.contextInfo?.externalAdReply,
|
||||
)
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
const adReply =
|
||||
protoMessage?.extendedTextMessage?.contextInfo?.externalAdReply;
|
||||
return {
|
||||
title: adReply.title ?? '',
|
||||
body: adReply.body ?? '',
|
||||
thumbnailUrl: adReply.thumbnailUrl ?? '',
|
||||
originalImageUrl: adReply.originalImageUrl ?? '',
|
||||
sourceUrl: adReply.sourceUrl ?? '',
|
||||
sourceId: adReply.sourceId ?? '',
|
||||
};
|
||||
}
|
||||
|
||||
private async getAttachments(
|
||||
adData: FacebookAdTemplateData,
|
||||
): Promise<SendAttachment[]> {
|
||||
const imageUrl = adData.originalImageUrl || adData.thumbnailUrl;
|
||||
if (!imageUrl) {
|
||||
return [];
|
||||
}
|
||||
|
||||
try {
|
||||
this.logger.info(`Downloading Facebook Ad image from '${imageUrl}'...`);
|
||||
const buffer = await fetchBuffer(imageUrl);
|
||||
const attachment: SendAttachment = {
|
||||
content: buffer.toString('base64'),
|
||||
filename: 'facebook-ad-image.jpg',
|
||||
encoding: 'base64',
|
||||
};
|
||||
this.logger.info(
|
||||
`Downloaded Facebook Ad image from '${imageUrl}' as '${attachment.filename}'`,
|
||||
);
|
||||
return [attachment];
|
||||
} catch (error) {
|
||||
const reason = error instanceof Error ? error.message : `${error}`;
|
||||
this.logger.error(
|
||||
`Failed to download Facebook Ad image from '${imageUrl}': ${reason}`,
|
||||
);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
import { ChatWootMessagePartial } from '@waha/apps/chatwoot/consumers/waha/base';
|
||||
import { Locale } from '@waha/apps/chatwoot/i18n/locale';
|
||||
import { TKey } from '@waha/apps/chatwoot/i18n/templates';
|
||||
import { MessageToChatWootConverter } from '@waha/apps/chatwoot/messages/to/chatwoot';
|
||||
import { isEmptyString } from '@waha/apps/chatwoot/messages/to/chatwoot/utils/proto';
|
||||
import { WhatsappToMarkdown } from '@waha/apps/chatwoot/messages/to/chatwoot/utils/markdown';
|
||||
import * as lodash from 'lodash';
|
||||
import type { proto } from '@adiwajshing/baileys';
|
||||
import { WAMessage } from '@waha/structures/responses.dto';
|
||||
|
||||
export class ListMessage implements MessageToChatWootConverter {
|
||||
constructor(private readonly locale: Locale) {}
|
||||
|
||||
convert(
|
||||
payload: WAMessage,
|
||||
protoMessage: proto.Message | null,
|
||||
): ChatWootMessagePartial | null {
|
||||
const listMessage = protoMessage?.listMessage;
|
||||
if (lodash.isEmpty(listMessage)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const content = this.locale
|
||||
.key(TKey.WA_TO_CW_MESSAGE_LIST)
|
||||
.r({ payload, message: protoMessage as proto.Message });
|
||||
|
||||
if (isEmptyString(content)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return {
|
||||
content: WhatsappToMarkdown(content),
|
||||
attachments: [],
|
||||
private: undefined,
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
import { Locale } from '@waha/apps/chatwoot/i18n/locale';
|
||||
import { TKey } from '@waha/apps/chatwoot/i18n/templates';
|
||||
import { ChatWootMessagePartial } from '@waha/apps/chatwoot/consumers/waha/base';
|
||||
import { isEmptyString } from './utils/proto';
|
||||
import * as lodash from 'lodash';
|
||||
import type { proto } from '@adiwajshing/baileys';
|
||||
import { WAMessage } from '@waha/structures/responses.dto';
|
||||
import { MessageToChatWootConverter } from '@waha/apps/chatwoot/messages/to/chatwoot';
|
||||
|
||||
export class LocationMessage implements MessageToChatWootConverter {
|
||||
constructor(private readonly locale: Locale) {}
|
||||
|
||||
convert(
|
||||
payload: WAMessage,
|
||||
protoMessage: proto.Message | null,
|
||||
): ChatWootMessagePartial | null {
|
||||
const hasLocation = !lodash.isEmpty(protoMessage?.locationMessage);
|
||||
const hasLiveLocation = !lodash.isEmpty(protoMessage?.liveLocationMessage);
|
||||
if (!hasLocation && !hasLiveLocation) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const content = this.locale
|
||||
.key(TKey.WA_TO_CW_MESSAGE_LOCATION)
|
||||
.r({ payload, message: protoMessage });
|
||||
|
||||
if (isEmptyString(content)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return {
|
||||
content,
|
||||
attachments: [],
|
||||
private: undefined,
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
import { ChatWootMessagePartial } from '@waha/apps/chatwoot/consumers/waha/base';
|
||||
import { Locale } from '@waha/apps/chatwoot/i18n/locale';
|
||||
import { TKey } from '@waha/apps/chatwoot/i18n/templates';
|
||||
import { MessageToChatWootConverter } from '@waha/apps/chatwoot/messages/to/chatwoot';
|
||||
import { WAMessage } from '@waha/structures/responses.dto';
|
||||
import type { proto } from '@adiwajshing/baileys';
|
||||
import { WhatsappToMarkdown } from '@waha/apps/chatwoot/messages/to/chatwoot/utils/markdown';
|
||||
|
||||
export class MessageEdited implements MessageToChatWootConverter {
|
||||
constructor(private readonly locale: Locale) {}
|
||||
|
||||
convert(
|
||||
payload: WAMessage,
|
||||
protoMessage: proto.Message | null,
|
||||
): ChatWootMessagePartial | null {
|
||||
void protoMessage;
|
||||
const formatted = WhatsappToMarkdown(payload.body);
|
||||
const content = this.locale
|
||||
.key(TKey.MESSAGE_EDITED_IN_WHATSAPP)
|
||||
.render({ text: formatted });
|
||||
|
||||
return {
|
||||
content,
|
||||
attachments: [],
|
||||
private: undefined,
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,248 @@
|
||||
import { PixMessage } from '@waha/apps/chatwoot/messages/to/chatwoot/PixMessage';
|
||||
import { resolveProtoMessage } from '@waha/apps/chatwoot/messages/to/chatwoot';
|
||||
import { WAMessage } from '@waha/structures/responses.dto';
|
||||
import { JestLogger } from '@waha/apps/app_sdk/jest/JestLogger';
|
||||
import { i18n } from '@waha/apps/chatwoot/i18n';
|
||||
|
||||
describe('PixMessage - pt-BR', () => {
|
||||
const locale = i18n.locale('pt-BR');
|
||||
|
||||
it('GOWS - no total amount', () => {
|
||||
// Setup
|
||||
const buttonParamsJson = JSON.stringify({
|
||||
currency: 'BRL',
|
||||
total_amount: {
|
||||
value: 0,
|
||||
offset: 100,
|
||||
},
|
||||
reference_id: '4TB11111111',
|
||||
type: 'physical-goods',
|
||||
order: {
|
||||
status: 'pending',
|
||||
subtotal: {
|
||||
value: 0,
|
||||
offset: 100,
|
||||
},
|
||||
order_type: 'ORDER',
|
||||
items: [
|
||||
{
|
||||
name: '',
|
||||
amount: {
|
||||
value: 0,
|
||||
offset: 100,
|
||||
},
|
||||
quantity: 0,
|
||||
sale_amount: {
|
||||
value: 0,
|
||||
offset: 100,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
payment_settings: [
|
||||
{
|
||||
type: 'pix_static_code',
|
||||
pix_static_code: {
|
||||
merchant_name: 'Merchant Name Here',
|
||||
key: '+5000000000000',
|
||||
key_type: 'PHONE',
|
||||
},
|
||||
},
|
||||
],
|
||||
share_payment_status: false,
|
||||
referral: 'chat_attachment',
|
||||
});
|
||||
|
||||
const payload = {
|
||||
id: 'false_559900000001@c.us_FAKEPIXORDER1',
|
||||
timestamp: 1899003201,
|
||||
from: '559900000001@c.us',
|
||||
fromMe: false,
|
||||
source: 'app',
|
||||
to: null,
|
||||
participant: null,
|
||||
hasMedia: false,
|
||||
ack: 2,
|
||||
ackName: 'DEVICE',
|
||||
body: '',
|
||||
_data: {
|
||||
Message: {
|
||||
messageContextInfo: {
|
||||
deviceListMetadata: {
|
||||
senderKeyHash: 'aFakeSenderKeyHash==',
|
||||
senderTimestamp: 1880001234,
|
||||
recipientKeyHash: 'anotherFakeRecipientKeyHash==',
|
||||
recipientTimestamp: 1880005678,
|
||||
},
|
||||
deviceListMetadataVersion: 2,
|
||||
messageSecret: 'fakeMessageSecret==',
|
||||
},
|
||||
interactiveMessage: {
|
||||
InteractiveMessage: {
|
||||
NativeFlowMessage: {
|
||||
buttons: [
|
||||
{
|
||||
name: 'payment_info',
|
||||
buttonParamsJSON: buttonParamsJson,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
contextInfo: {
|
||||
expiration: 0,
|
||||
ephemeralSettingTimestamp: 1880006789,
|
||||
disappearingMode: {
|
||||
initiator: 0,
|
||||
trigger: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
} as unknown as WAMessage;
|
||||
|
||||
// Test
|
||||
const logger = JestLogger();
|
||||
const protoMessage = resolveProtoMessage(payload);
|
||||
const converter = new PixMessage(locale, logger);
|
||||
const result = converter.convert(payload, protoMessage);
|
||||
|
||||
// Assert
|
||||
const expected = `💳 ****PIX - Copia e Cola****
|
||||
|
||||
****Merchant Name Here****
|
||||
|
||||
****Chave PIX:**** +5000000000000
|
||||
****Tipo:**** PHONE
|
||||
****Referência:**** 4TB11111111
|
||||
|
||||
💳 ****PIX Copia e Cola enviado****`;
|
||||
|
||||
expect(protoMessage).not.toBeNull();
|
||||
expect(result).not.toBeNull();
|
||||
expect(result.content).toEqual(expected);
|
||||
expect(logger.fatal).not.toHaveBeenCalled();
|
||||
expect(logger.error).not.toHaveBeenCalled();
|
||||
expect(logger.warn).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('GOWS - with total amount', () => {
|
||||
// Setup
|
||||
const buttonParamsJson = JSON.stringify({
|
||||
currency: 'BRL',
|
||||
total_amount: {
|
||||
value: 2512,
|
||||
offset: 100,
|
||||
},
|
||||
reference_id: '4TB11111111',
|
||||
type: 'physical-goods',
|
||||
order: {
|
||||
status: 'pending',
|
||||
subtotal: {
|
||||
value: 2512,
|
||||
offset: 100,
|
||||
},
|
||||
order_type: 'ORDER',
|
||||
items: [
|
||||
{
|
||||
name: '',
|
||||
amount: {
|
||||
value: 2512,
|
||||
offset: 100,
|
||||
},
|
||||
quantity: 1,
|
||||
sale_amount: {
|
||||
value: 2512,
|
||||
offset: 100,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
payment_settings: [
|
||||
{
|
||||
type: 'pix_static_code',
|
||||
pix_static_code: {
|
||||
merchant_name: 'Merchant Name Here',
|
||||
key: '+5000000000000',
|
||||
key_type: 'PHONE',
|
||||
},
|
||||
},
|
||||
],
|
||||
share_payment_status: false,
|
||||
referral: 'chat_attachment',
|
||||
});
|
||||
|
||||
const payload = {
|
||||
id: 'false_559900000001@c.us_FAKEPIXORDER1',
|
||||
timestamp: 1899003201,
|
||||
from: '559900000001@c.us',
|
||||
fromMe: false,
|
||||
source: 'app',
|
||||
to: null,
|
||||
participant: null,
|
||||
hasMedia: false,
|
||||
ack: 2,
|
||||
ackName: 'DEVICE',
|
||||
body: '',
|
||||
_data: {
|
||||
Message: {
|
||||
messageContextInfo: {
|
||||
deviceListMetadata: {
|
||||
senderKeyHash: 'aFakeSenderKeyHash==',
|
||||
senderTimestamp: 1880001234,
|
||||
recipientKeyHash: 'anotherFakeRecipientKeyHash==',
|
||||
recipientTimestamp: 1880005678,
|
||||
},
|
||||
deviceListMetadataVersion: 2,
|
||||
messageSecret: 'fakeMessageSecret==',
|
||||
},
|
||||
interactiveMessage: {
|
||||
InteractiveMessage: {
|
||||
NativeFlowMessage: {
|
||||
buttons: [
|
||||
{
|
||||
name: 'payment_info',
|
||||
buttonParamsJSON: buttonParamsJson,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
contextInfo: {
|
||||
expiration: 0,
|
||||
ephemeralSettingTimestamp: 1880006789,
|
||||
disappearingMode: {
|
||||
initiator: 0,
|
||||
trigger: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
} as unknown as WAMessage;
|
||||
|
||||
// Test
|
||||
const logger = JestLogger();
|
||||
const protoMessage = resolveProtoMessage(payload);
|
||||
const converter = new PixMessage(locale, logger);
|
||||
const result = converter.convert(payload, protoMessage);
|
||||
|
||||
// Assert
|
||||
const expected = `💳 ****PIX - Copia e Cola****
|
||||
|
||||
****Merchant Name Here****
|
||||
|
||||
****Chave PIX:**** +5000000000000
|
||||
****Tipo:**** PHONE
|
||||
****Valor:**** R$\u00A025,12
|
||||
****Referência:**** 4TB11111111
|
||||
|
||||
💳 ****PIX Copia e Cola enviado****`;
|
||||
|
||||
expect(protoMessage).not.toBeNull();
|
||||
expect(result).not.toBeNull();
|
||||
expect(result.content).toEqual(expected);
|
||||
expect(logger.fatal).not.toHaveBeenCalled();
|
||||
expect(logger.error).not.toHaveBeenCalled();
|
||||
expect(logger.warn).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,124 @@
|
||||
import { ILogger } from '@waha/apps/app_sdk/ILogger';
|
||||
import { ChatWootMessagePartial } from '@waha/apps/chatwoot/consumers/waha/base';
|
||||
import { Locale } from '@waha/apps/chatwoot/i18n/locale';
|
||||
import { PixTemplatePayload, TKey } from '@waha/apps/chatwoot/i18n/templates';
|
||||
import { MessageToChatWootConverter } from '@waha/apps/chatwoot/messages/to/chatwoot';
|
||||
import { isEmptyString } from '@waha/apps/chatwoot/messages/to/chatwoot/utils/proto';
|
||||
import { WhatsappToMarkdown } from '@waha/apps/chatwoot/messages/to/chatwoot/utils/markdown';
|
||||
import * as lodash from 'lodash';
|
||||
import type { proto } from '@adiwajshing/baileys';
|
||||
import { WAMessage } from '@waha/structures/responses.dto';
|
||||
|
||||
export class PixMessage implements MessageToChatWootConverter {
|
||||
constructor(
|
||||
private readonly l: Locale,
|
||||
private readonly logger: ILogger,
|
||||
) {}
|
||||
|
||||
convert(
|
||||
payload: WAMessage,
|
||||
protoMessage: proto.Message | null,
|
||||
): ChatWootMessagePartial | null {
|
||||
if (!protoMessage) {
|
||||
return null;
|
||||
}
|
||||
const pixData = this.extractPixData(protoMessage);
|
||||
if (!pixData) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const content = this.l.key(TKey.WA_TO_CW_MESSAGE_PIX).r({
|
||||
payload: payload,
|
||||
message: protoMessage,
|
||||
pixData: pixData,
|
||||
});
|
||||
|
||||
if (isEmptyString(content)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return {
|
||||
content: WhatsappToMarkdown(content),
|
||||
attachments: [],
|
||||
private: undefined,
|
||||
};
|
||||
}
|
||||
|
||||
private extractPixData(
|
||||
protoMessage: proto.Message,
|
||||
): PixTemplatePayload | null {
|
||||
const buttons = this.resolveNativeFlowButtons(protoMessage);
|
||||
if (!buttons || buttons.length === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const paymentButton = buttons.find(
|
||||
(button) => button?.name === 'payment_info' && button?.buttonParamsJson,
|
||||
);
|
||||
|
||||
if (!paymentButton?.buttonParamsJson) {
|
||||
return null;
|
||||
}
|
||||
|
||||
let params: any;
|
||||
try {
|
||||
params = JSON.parse(paymentButton.buttonParamsJson);
|
||||
} catch (error) {
|
||||
this.logger.warn(`Failed to parse PIX button params: ${error}`);
|
||||
return null;
|
||||
}
|
||||
|
||||
const pixSettings = params?.payment_settings?.find(
|
||||
(setting: any) => setting?.type === 'pix_static_code',
|
||||
);
|
||||
const pixCode = pixSettings?.pix_static_code;
|
||||
if (!pixCode) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const totalAmountFormatted = this.l.FormatCurrency(
|
||||
params?.currency,
|
||||
params?.total_amount?.value,
|
||||
params?.total_amount?.offset,
|
||||
);
|
||||
const data: PixTemplatePayload = {
|
||||
merchantName: pixCode.merchant_name,
|
||||
key: pixCode.key,
|
||||
keyType: pixCode.key_type,
|
||||
currency: params?.currency,
|
||||
totalAmount: params?.total_amount?.value,
|
||||
totalAmountFormatted: totalAmountFormatted,
|
||||
referenceId: params?.reference_id,
|
||||
};
|
||||
|
||||
if (lodash.isEmpty(data)) {
|
||||
return null;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
private resolveNativeFlowButtons(
|
||||
protoMessage: proto.Message,
|
||||
):
|
||||
| proto.Message.InteractiveMessage.NativeFlowMessage.INativeFlowButton[]
|
||||
| null {
|
||||
let interactiveMessage: proto.Message.IInteractiveMessage =
|
||||
protoMessage?.interactiveMessage;
|
||||
if (lodash.isEmpty(interactiveMessage)) {
|
||||
return null;
|
||||
}
|
||||
// GOWS has weird oneOf protobuf behaviour,
|
||||
// so we need to double interactiveMessage
|
||||
if (
|
||||
!lodash.isEmpty(
|
||||
(interactiveMessage as proto.Message.InteractiveMessage)
|
||||
.interactiveMessage,
|
||||
)
|
||||
) {
|
||||
interactiveMessage = (
|
||||
interactiveMessage as proto.Message.InteractiveMessage
|
||||
).interactiveMessage as proto.Message.IInteractiveMessage;
|
||||
}
|
||||
return interactiveMessage?.nativeFlowMessage?.buttons;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
import { ChatWootMessagePartial } from '@waha/apps/chatwoot/consumers/waha/base';
|
||||
import { Locale } from '@waha/apps/chatwoot/i18n/locale';
|
||||
import { PollCreationMessage, TKey } from '@waha/apps/chatwoot/i18n/templates';
|
||||
import { MessageToChatWootConverter } from '@waha/apps/chatwoot/messages/to/chatwoot';
|
||||
import { isEmptyString } from '@waha/apps/chatwoot/messages/to/chatwoot/utils/proto';
|
||||
import { WhatsappToMarkdown } from '@waha/apps/chatwoot/messages/to/chatwoot/utils/markdown';
|
||||
import type { proto } from '@adiwajshing/baileys';
|
||||
import { WAMessage } from '@waha/structures/responses.dto';
|
||||
import * as lodash from 'lodash';
|
||||
|
||||
export class PollMessage implements MessageToChatWootConverter {
|
||||
constructor(private readonly locale: Locale) {}
|
||||
|
||||
convert(
|
||||
payload: WAMessage,
|
||||
protoMessage: proto.Message | null,
|
||||
): ChatWootMessagePartial | null {
|
||||
let poll: PollCreationMessage = null;
|
||||
if (!lodash.isEmpty(protoMessage?.pollCreationMessage)) {
|
||||
poll = protoMessage.pollCreationMessage;
|
||||
}
|
||||
if (!lodash.isEmpty(protoMessage?.pollCreationMessageV2)) {
|
||||
poll = protoMessage.pollCreationMessageV2;
|
||||
}
|
||||
if (!lodash.isEmpty(protoMessage?.pollCreationMessageV3)) {
|
||||
poll = protoMessage.pollCreationMessageV3;
|
||||
}
|
||||
if (!poll) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const content = this.locale
|
||||
.key(TKey.WA_TO_CW_MESSAGE_POLL)
|
||||
.r({ payload: payload, poll: poll, message: protoMessage });
|
||||
|
||||
if (isEmptyString(content)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return {
|
||||
content: WhatsappToMarkdown(content),
|
||||
attachments: [],
|
||||
private: undefined,
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
import { ILogger } from '@waha/apps/app_sdk/ILogger';
|
||||
import { SendAttachment } from '@waha/apps/chatwoot/client/types';
|
||||
import { ChatWootMessagePartial } from '@waha/apps/chatwoot/consumers/waha/base';
|
||||
import { Locale } from '@waha/apps/chatwoot/i18n/locale';
|
||||
import { TKey } from '@waha/apps/chatwoot/i18n/templates';
|
||||
import { parseVCardV3, SimpleVCardInfo } from '@waha/core/vcard';
|
||||
import * as lodash from 'lodash';
|
||||
import type { proto } from '@adiwajshing/baileys';
|
||||
import { WAMessage } from '@waha/structures/responses.dto';
|
||||
import { MessageToChatWootConverter } from '@waha/apps/chatwoot/messages/to/chatwoot';
|
||||
|
||||
export class ShareContactMessage implements MessageToChatWootConverter {
|
||||
constructor(
|
||||
private readonly locale: Locale,
|
||||
private readonly logger: ILogger,
|
||||
) {}
|
||||
|
||||
convert(
|
||||
payload: WAMessage,
|
||||
protoMessage: proto.Message | null,
|
||||
): ChatWootMessagePartial | null {
|
||||
void payload;
|
||||
const vcards = collectVcards(protoMessage);
|
||||
if (vcards.length === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const attachments: SendAttachment[] = vcards.map((vcard, index) => ({
|
||||
content: Buffer.from(vcard, 'utf8').toString('base64'),
|
||||
encoding: 'base64',
|
||||
filename: `vcard-${index + 1}.vcf`,
|
||||
}));
|
||||
|
||||
let contacts: SimpleVCardInfo[] = [];
|
||||
try {
|
||||
contacts = vcards.map(parseVCardV3);
|
||||
} catch (err) {
|
||||
this.logger.error(
|
||||
`Error parsing some vcards: vcards=${vcards}, err=${err}`,
|
||||
);
|
||||
}
|
||||
|
||||
if (contacts.length === 0 && attachments.length === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const content = this.locale
|
||||
.key(TKey.WA_TO_CW_MESSAGE_CONTACTS)
|
||||
.r({ contacts });
|
||||
|
||||
return {
|
||||
content,
|
||||
attachments,
|
||||
private: undefined,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function collectVcards(message: proto.Message | null): string[] {
|
||||
if (lodash.isEmpty(message?.contactsArrayMessage?.contacts)) {
|
||||
if (!lodash.isEmpty(message?.contactMessage?.vcard)) {
|
||||
return [message!.contactMessage!.vcard];
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
return message!.contactsArrayMessage!.contacts.map(
|
||||
(contact) => contact.vcard,
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
import { ILogger } from '@waha/apps/app_sdk/ILogger';
|
||||
import { SendAttachment } from '@waha/apps/chatwoot/client/types';
|
||||
import { ChatWootMessagePartial } from '@waha/apps/chatwoot/consumers/waha/base';
|
||||
import { Locale } from '@waha/apps/chatwoot/i18n/locale';
|
||||
import { TKey } from '@waha/apps/chatwoot/i18n/templates';
|
||||
import { WAHASelf } from '@waha/apps/chatwoot/session/WAHASelf';
|
||||
import { isEmptyString } from './utils/proto';
|
||||
import type { proto } from '@adiwajshing/baileys';
|
||||
import { WAMessage } from '@waha/structures/responses.dto';
|
||||
import { MessageToChatWootConverter } from '@waha/apps/chatwoot/messages/to/chatwoot';
|
||||
import { WhatsappToMarkdown } from '@waha/apps/chatwoot/messages/to/chatwoot/utils/markdown';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const mime = require('mime-types');
|
||||
|
||||
export class TextMessage implements MessageToChatWootConverter {
|
||||
constructor(
|
||||
private readonly locale: Locale,
|
||||
private readonly logger: ILogger,
|
||||
private readonly waha: WAHASelf,
|
||||
) {}
|
||||
|
||||
async convert(
|
||||
payload: WAMessage,
|
||||
protoMessage: proto.Message | null,
|
||||
): Promise<ChatWootMessagePartial | null> {
|
||||
void protoMessage;
|
||||
const attachments = await this.getAttachments(payload);
|
||||
let content = this.locale.key(TKey.WA_TO_CW_MESSAGE).render({ payload });
|
||||
if (isEmptyString(content) && attachments.length === 0) {
|
||||
return null;
|
||||
}
|
||||
if (isEmptyString(content)) {
|
||||
content = null;
|
||||
}
|
||||
return {
|
||||
content: WhatsappToMarkdown(content),
|
||||
attachments,
|
||||
private: undefined,
|
||||
};
|
||||
}
|
||||
|
||||
private async getAttachments(payload: WAMessage): Promise<SendAttachment[]> {
|
||||
const hasMedia = payload.media?.url;
|
||||
if (!hasMedia) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const media = payload.media!;
|
||||
this.logger.info(`Downloading media from '${media.url}'...`);
|
||||
const buffer = await this.waha.fetch(media.url);
|
||||
const fileContent = buffer.toString('base64');
|
||||
let filename = media.filename;
|
||||
if (!filename) {
|
||||
const extension = mime.extension(media.mimetype);
|
||||
filename = `no-filename.${extension}`;
|
||||
}
|
||||
|
||||
const attachment: SendAttachment = {
|
||||
content: fileContent,
|
||||
filename,
|
||||
encoding: 'base64',
|
||||
};
|
||||
this.logger.info(`Downloaded media from '${media.url}' as '${filename}'`);
|
||||
return [attachment];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
import { JobLink } from '@waha/apps/app_sdk/JobUtils';
|
||||
import { Locale } from '@waha/apps/chatwoot/i18n/locale';
|
||||
import { TKey } from '@waha/apps/chatwoot/i18n/templates';
|
||||
import { Job } from 'bullmq';
|
||||
import { ChatWootMessagePartial } from '@waha/apps/chatwoot/consumers/waha/base';
|
||||
import type { proto } from '@adiwajshing/baileys';
|
||||
import { WAMessage } from '@waha/structures/responses.dto';
|
||||
import { MessageToChatWootConverter } from '@waha/apps/chatwoot/messages/to/chatwoot';
|
||||
|
||||
export class UnsupportedMessage implements MessageToChatWootConverter {
|
||||
constructor(
|
||||
private readonly locale: Locale,
|
||||
private readonly job: Job,
|
||||
) {}
|
||||
|
||||
convert(
|
||||
payload: WAMessage,
|
||||
protoMessage: proto.Message | null,
|
||||
): ChatWootMessagePartial {
|
||||
void payload;
|
||||
void protoMessage;
|
||||
const content = this.locale
|
||||
.key(TKey.WA_TO_CW_MESSAGE_UNSUPPORTED)
|
||||
.render({ details: JobLink(this.job) });
|
||||
|
||||
return {
|
||||
content,
|
||||
attachments: [],
|
||||
private: true,
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import { WAMessage } from '@waha/structures/responses.dto';
|
||||
import type { proto } from '@adiwajshing/baileys';
|
||||
import { ChatWootMessagePartial } from '@waha/apps/chatwoot/consumers/waha/base';
|
||||
|
||||
export { resolveProtoMessage } from './utils/proto';
|
||||
export { TextMessage } from './TextMessage';
|
||||
export { LocationMessage } from './LocationMessage';
|
||||
export { ShareContactMessage } from './ShareContactMessage';
|
||||
export { UnsupportedMessage } from './UnsupportedMessage';
|
||||
export { MessageEdited } from './MessageEdited';
|
||||
export { FacebookAdMessage } from './FacebookAdMessage';
|
||||
export { PollMessage } from './PollMessage';
|
||||
export { EventMessage } from './EventMessage';
|
||||
export { PixMessage } from './PixMessage';
|
||||
export { ListMessage } from './ListMessage';
|
||||
|
||||
export type Awaitable<T> = T | Promise<T>;
|
||||
|
||||
export interface MessageToChatWootConverter {
|
||||
convert(
|
||||
payload: WAMessage,
|
||||
protoMessage: proto.Message | null,
|
||||
): Awaitable<ChatWootMessagePartial | null>;
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
import { WhatsappToMarkdown } from './markdown';
|
||||
|
||||
describe('WhatsappToMarkdown', () => {
|
||||
it('converts asterisks to bold', () => {
|
||||
const input = '*bold*';
|
||||
expect(WhatsappToMarkdown(input)).toBe('**bold**');
|
||||
});
|
||||
it('converts underscores to italic', () => {
|
||||
const input = '_italic_';
|
||||
expect(WhatsappToMarkdown(input)).toBe('*italic*');
|
||||
});
|
||||
it('handles multiple transformations at once', () => {
|
||||
const input = `*bold* | _italic_ | ~strike~ | \`one line code\` | \`\`\`\nmultiple lines\`\`\` `;
|
||||
const expected = `**bold** | *italic* | ~~strike~~ | \`one line code\` | \`\`\`\nmultiple lines\`\`\` `;
|
||||
expect(WhatsappToMarkdown(input)).toBe(expected);
|
||||
});
|
||||
|
||||
// Tests for URL protection
|
||||
it('preserves URLs with single underscore', () => {
|
||||
const input = 'https://example.com/page_name';
|
||||
expect(WhatsappToMarkdown(input)).toBe('https://example.com/page_name');
|
||||
});
|
||||
|
||||
it('preserves URLs with double underscores', () => {
|
||||
const input = 'https://en.wikipedia.org/wiki/Sarah_Jessica_Parker';
|
||||
expect(WhatsappToMarkdown(input)).toBe(
|
||||
'https://en.wikipedia.org/wiki/Sarah_Jessica_Parker',
|
||||
);
|
||||
});
|
||||
|
||||
it('preserves URLs with multiple underscores', () => {
|
||||
const input = 'https://example.com/a_b_c_test';
|
||||
expect(WhatsappToMarkdown(input)).toBe('https://example.com/a_b_c_test');
|
||||
});
|
||||
|
||||
it('handles mixed text with URLs and formatting', () => {
|
||||
const input = 'Veja *isso* em https://example.com/test_link e _aquilo_';
|
||||
const expected =
|
||||
'Veja **isso** em https://example.com/test_link e *aquilo*';
|
||||
expect(WhatsappToMarkdown(input)).toBe(expected);
|
||||
});
|
||||
|
||||
it('handles multiple URLs in same text', () => {
|
||||
const input =
|
||||
'Links: https://example.com/page_1 e https://example.com/page_2';
|
||||
expect(WhatsappToMarkdown(input)).toBe(
|
||||
'Links: https://example.com/page_1 e https://example.com/page_2',
|
||||
);
|
||||
});
|
||||
|
||||
it('handles URLs with underscores and regular italic formatting', () => {
|
||||
const input = 'URL: https://example.com/test_page e texto _em itálico_';
|
||||
const expected = 'URL: https://example.com/test_page e texto *em itálico*';
|
||||
expect(WhatsappToMarkdown(input)).toBe(expected);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,28 @@
|
||||
import { UrlProtection } from '@waha/apps/chatwoot/messages/to/markdown';
|
||||
|
||||
export function WhatsappToMarkdown(text: string): string {
|
||||
if (!text) {
|
||||
return text;
|
||||
}
|
||||
if (text == '') {
|
||||
return '';
|
||||
}
|
||||
|
||||
// Extract and protect URLs before formatting transformations
|
||||
const protection = new UrlProtection();
|
||||
const urls = protection.protect(text);
|
||||
text = urls.text;
|
||||
|
||||
// Apply markdown transformations to "clean" text
|
||||
let result = text
|
||||
// Bold: *bold* → **bold**
|
||||
.replace(/\*(.*?)\*/g, '**$1**')
|
||||
// Strikethrough: ~strike~ → ~~strike~~
|
||||
.replace(/~(.*?)~/g, '~~$1~~')
|
||||
// Italic: _italic_ → *italic*
|
||||
.replace(/_(.*?)_/g, '*$1*');
|
||||
|
||||
// Restore original URLs after all transformations
|
||||
result = urls.restore(result);
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
import { camelCaseKeysDeep } from './proto';
|
||||
|
||||
describe('camelCaseKeysDeep', () => {
|
||||
it('URL to url', () => {
|
||||
const input = { URL: 'https://example.com/image.png' };
|
||||
|
||||
const result = camelCaseKeysDeep(input);
|
||||
|
||||
expect(result).toEqual({
|
||||
url: 'https://example.com/image.png',
|
||||
});
|
||||
});
|
||||
|
||||
it('converts originalImageURL to originalImageUrl', () => {
|
||||
const input = { originalImageURL: 'https://example.com/image.png' };
|
||||
|
||||
const result = camelCaseKeysDeep(input);
|
||||
|
||||
expect(result).toEqual({
|
||||
originalImageUrl: 'https://example.com/image.png',
|
||||
});
|
||||
});
|
||||
|
||||
it('keeps externalAdReply as externalAdReply', () => {
|
||||
const input = { externalAdReply: { title: 'Sample' } };
|
||||
|
||||
const result = camelCaseKeysDeep(input);
|
||||
|
||||
expect(result).toEqual({ externalAdReply: { title: 'Sample' } });
|
||||
});
|
||||
|
||||
it('converts PascalCase keys to pascalCase', () => {
|
||||
const input = { PascalCase: 'value' };
|
||||
|
||||
const result = camelCaseKeysDeep(input);
|
||||
|
||||
expect(result).toEqual({ pascalCase: 'value' });
|
||||
});
|
||||
|
||||
it('camel cases keys nested inside arrays while keeping primitive entries intact', () => {
|
||||
const input = [
|
||||
{ MixedCaseKey: 'value', inner_object: { AnotherNestedKey: 42 } },
|
||||
'STRING_VALUE',
|
||||
10,
|
||||
];
|
||||
|
||||
const result = camelCaseKeysDeep(input);
|
||||
|
||||
expect(result).toEqual([
|
||||
{ mixedCaseKey: 'value', innerObject: { anotherNestedKey: 42 } },
|
||||
'STRING_VALUE',
|
||||
10,
|
||||
]);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,38 @@
|
||||
import { WAMessage } from '@waha/structures/responses.dto';
|
||||
import type { proto } from '@adiwajshing/baileys';
|
||||
import * as lodash from 'lodash';
|
||||
|
||||
export function camelCaseKeysDeep<T = any>(input: unknown): T {
|
||||
if (Array.isArray(input)) return input.map(camelCaseKeysDeep) as unknown as T;
|
||||
if (input && typeof input === 'object') {
|
||||
const mapped = lodash.mapKeys(input as Record<string, unknown>, (_v, k) =>
|
||||
lodash.camelCase(k),
|
||||
);
|
||||
return lodash.mapValues(mapped, camelCaseKeysDeep) as unknown as T;
|
||||
}
|
||||
return input as T;
|
||||
}
|
||||
|
||||
export function resolveProtoMessage(payload: WAMessage): proto.Message | null {
|
||||
// GOWS
|
||||
if (payload._data.Message) {
|
||||
const protoMessage = payload._data.Message;
|
||||
// mediaURL => mediaUrl
|
||||
// otherAttributes => otherAttributes
|
||||
return camelCaseKeysDeep(protoMessage);
|
||||
}
|
||||
|
||||
// NOWEB
|
||||
if (payload._data.message) {
|
||||
return payload._data.message;
|
||||
}
|
||||
// WEBJS - not available
|
||||
return null;
|
||||
}
|
||||
|
||||
export function isEmptyString(content: string) {
|
||||
if (!content) {
|
||||
return true;
|
||||
}
|
||||
return content === '' || content === '\n';
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
const DEFAULT_PLACEHOLDER_PREFIX = 'URLPLACEHOLDER';
|
||||
const URL_REGEX = /https?:\/\/[^\s]+/g;
|
||||
|
||||
export class UrlProtection {
|
||||
/** Replaces URLs with placeholders so downstream formatters don't touch them. */
|
||||
constructor(
|
||||
private readonly placeholder: string = DEFAULT_PLACEHOLDER_PREFIX,
|
||||
) {}
|
||||
|
||||
protect(text: string): ProtectedUrlText {
|
||||
const urls: string[] = [];
|
||||
const result = text.replace(URL_REGEX, (url) => {
|
||||
const index = urls.length;
|
||||
urls.push(url);
|
||||
return `${this.placeholder}${index}`;
|
||||
});
|
||||
|
||||
return new ProtectedUrlText(result, urls, this.placeholder);
|
||||
}
|
||||
}
|
||||
|
||||
export class ProtectedUrlText {
|
||||
/** Carries protected text and restores URLs back into place. */
|
||||
constructor(
|
||||
public text: string,
|
||||
private readonly urls: string[],
|
||||
private readonly placeholder: string,
|
||||
) {}
|
||||
|
||||
restore(text: string = this.text): string {
|
||||
return this.urls.reduce((acc, url, index) => {
|
||||
const placeholder = `${this.placeholder}${index}`;
|
||||
return acc.replace(placeholder, url);
|
||||
}, text);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
import { MarkdownToWhatsApp } from './markdown';
|
||||
|
||||
describe('MarkdownToWhatsApp', () => {
|
||||
it('converts triple-backtick blocks', () => {
|
||||
const input = '```code block```';
|
||||
expect(MarkdownToWhatsApp(input)).toBe('```code block```');
|
||||
});
|
||||
it('converts italic and bold syntax', () => {
|
||||
const input = '*italic* **bold**';
|
||||
expect(MarkdownToWhatsApp(input)).toBe('_italic_ *bold*');
|
||||
});
|
||||
it('handles multiple transformations at once', () => {
|
||||
const input = `Here is a code block:\n\`\`\`some code\`\`\`\n**bold** *italic* ~~strike~~ [example](http://example.com)\n- item`;
|
||||
const expected = `Here is a code block:\n\`\`\`some code\`\`\`\n*bold* _italic_ ~strike~ example (http://example.com)\n* item`;
|
||||
expect(MarkdownToWhatsApp(input)).toBe(expected);
|
||||
});
|
||||
|
||||
// Tests for URL protection
|
||||
it('preserves URLs with multiple underscores', () => {
|
||||
const input = 'https://example.com/page__name__test';
|
||||
expect(MarkdownToWhatsApp(input)).toBe(
|
||||
'https://example.com/page__name__test',
|
||||
);
|
||||
});
|
||||
|
||||
it('preserves URLs with double underscores', () => {
|
||||
const input = 'https://en.wikipedia.org/wiki/Sarah_Jessica_Parker';
|
||||
expect(MarkdownToWhatsApp(input)).toBe(
|
||||
'https://en.wikipedia.org/wiki/Sarah_Jessica_Parker',
|
||||
);
|
||||
});
|
||||
|
||||
it('preserves URLs inside markdown links', () => {
|
||||
const input =
|
||||
'Veja [perfil](https://en.wikipedia.org/wiki/Sarah_Jessica_Parker)';
|
||||
const expected =
|
||||
'Veja perfil (https://en.wikipedia.org/wiki/Sarah_Jessica_Parker)';
|
||||
expect(MarkdownToWhatsApp(input)).toBe(expected);
|
||||
});
|
||||
|
||||
it('handles mixed text with URLs and formatting', () => {
|
||||
const input = 'Veja **isso** em https://example.com/test_link e _aquilo_';
|
||||
const expected = 'Veja *isso* em https://example.com/test_link e _aquilo_';
|
||||
expect(MarkdownToWhatsApp(input)).toBe(expected);
|
||||
});
|
||||
|
||||
it('handles multiple URLs in the same text', () => {
|
||||
const input =
|
||||
'Links: https://example.com/page_1 e https://example.com/page_2';
|
||||
expect(MarkdownToWhatsApp(input)).toBe(
|
||||
'Links: https://example.com/page_1 e https://example.com/page_2',
|
||||
);
|
||||
});
|
||||
});
|
||||
Loaded 100 of 169 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user