From 93021f9db5ccc3ef03271aa9b09d1e91df54fac5 Mon Sep 17 00:00:00 2001 From: Promise Fru Date: Thu, 9 Oct 2025 15:23:31 +0100 Subject: [PATCH 1/5] feat(specification): simplify Content Format V4 by removing content type indicator details --- docs/specification.md | 92 +++++++++++++++++-------------------------- 1 file changed, 36 insertions(+), 56 deletions(-) diff --git a/docs/specification.md b/docs/specification.md index 4e47f93..386fab4 100644 --- a/docs/specification.md +++ b/docs/specification.md @@ -250,76 +250,56 @@ > [!NOTE] > -> This format extends V3 by adding support for image content. A content type indicator determines which content types are present. +> This format extends V3 by adding support for image content. > > **All 2-byte length fields are encoded as unsigned little-endian.** -#### Content Type Indicator - -The content type indicator is a single byte with the following values: - -- **0**: Text-only content -- **1**: Image-only content -- **2**: Text and image content - 1. **Email format**: Binary-encoded fields with the following structure: - - **1 byte**: Content type indicator - - **1 byte**: Length of `from` field (if text content present). - - **2 bytes**: Length of `to` field (if text content present). - - **2 bytes**: Length of `cc` field (if text content present). - - **2 bytes**: Length of `bcc` field (if text content present). - - **1 byte**: Length of `subject` field (if text content present). - - **2 bytes**: Length of `body` field (if text content present). - - **2 bytes**: Length of `access_token` field (if text content present and optional). - - **2 bytes**: Length of `refresh_token` field (if text content present and optional). - - **2 bytes**: `Image Session ID` (if image content present). - - **1 byte**: `Image Segment info` (if image content present). - - **2 bytes**: Length of `Image` (if image content present). - - **Variable**: Value of `from` field (if text content present). - - **Variable**: Value of `to` field (if text content present). - - **Variable**: Value of `cc` field (if text content present). - - **Variable**: Value of `bcc` field (if text content present). - - **Variable**: Value of `subject` field (if text content present). - - **Variable**: Value of `body` field (if text content present). - - **Variable**: Value of `access_token` field (if text content present and token provided). - - **Variable**: Value of `refresh_token` field (if text content present and token provided). - - **Variable**: Value of `Image` (if image content present). + - **Variable**: Value of `image` field. + - **1 byte**: Length of `from` field. + - **2 bytes**: Length of `to` field. + - **2 bytes**: Length of `cc` field. + - **2 bytes**: Length of `bcc` field. + - **1 byte**: Length of `subject` field. + - **2 bytes**: Length of `body` field. + - **2 bytes**: Length of `access_token` field (optional). + - **2 bytes**: Length of `refresh_token` field (optional). + - **Variable**: Value of `from` field. + - **Variable**: Value of `to` field. + - **Variable**: Value of `cc` field. + - **Variable**: Value of `bcc` field. + - **Variable**: Value of `subject` field. + - **Variable**: Value of `body` field. + - **Variable**: Value of `access_token` field (if present). + - **Variable**: Value of `refresh_token` field (if present). 2. **Text format**: Binary-encoded fields with the following structure: - - **1 byte**: Content type indicator - - **1 byte**: Length of `from` field (if text content present). - - **2 bytes**: Length of `body` field (if text content present). - - **2 bytes**: Length of `access_token` field (if text content present and optional). - - **2 bytes**: Length of `refresh_token` field (if text content present and optional). - - **2 bytes**: `Image Session ID` (if image content present). - - **1 byte**: `Image Segment info` (if image content present). - - **2 bytes**: Length of `Image` (if image content present). - - **Variable**: Value of `from` field (if text content present). - - **Variable**: Value of `body` field (if text content present). - - **Variable**: Value of `access_token` field (if text content present and token provided). - - **Variable**: Value of `refresh_token` field (if text content present and token provided). - - **Variable**: Value of `Image` (if image content present). + - **Variable**: Value of `image` field. + - **1 byte**: Length of `from` field. + - **2 bytes**: Length of `body` field. + - **2 bytes**: Length of `access_token` field (optional). + - **2 bytes**: Length of `refresh_token` field (optional). + - **Variable**: Value of `from` field. + - **Variable**: Value of `body` field. + - **Variable**: Value of `access_token` field (if present). + - **Variable**: Value of `refresh_token` field (if present). 3. **Message format**: Binary-encoded fields with the following structure: - - **1 byte**: Content type indicator - - **1 byte**: Length of `from` field (if text content present). - - **2 bytes**: Length of `to` field (if text content present). - - **2 bytes**: Length of `body` field (if text content present). - - **2 bytes**: `Image Session ID` (if image content present). - - **1 byte**: `Image Segment info` (if image content present). - - **2 bytes**: Length of `Image` (if image content present). - - **Variable**: Value of `from` field (if text content present). - - **Variable**: Value of `to` field (if text content present). - - **Variable**: Value of `body` field (if text content present). - - **Variable**: Value of `Image` (if image content present). + - **Variable**: Value of `image` field. + - **1 byte**: Length of `from` field. + - **2 bytes**: Length of `to` field. + - **2 bytes**: Length of `body` field. + - **Variable**: Value of `from` field. + - **Variable**: Value of `to` field. + - **Variable**: Value of `body` field. 4. **Test format**: Binary-encoded fields with the following structure: - - **1 byte**: Length of `from` field (if text content present). - - **Variable**: Value of `from` field (considered the test ID, if text content present). + - **1 byte**: Length of `from` field. + - **Variable**: Value of `from` field (considered the test ID). ## Supported Payload Versions From 8acab6afa3b2cc3436b02a4343712c8a63c58a93 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Oct 2025 17:18:12 +0000 Subject: [PATCH 2/5] chore(deps): bump python from 3.13.7-slim to 3.14.0-slim Bumps python from 3.13.7-slim to 3.14.0-slim. --- updated-dependencies: - dependency-name: python dependency-version: 3.14.0-slim dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5780c83..f926e32 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.13.7-slim +FROM python:3.14.0-slim WORKDIR /publisher From d2d1c46767632420ab6cf6b1200fd69fa6060e4c Mon Sep 17 00:00:00 2001 From: Promise Fru Date: Tue, 14 Oct 2025 13:14:28 +0100 Subject: [PATCH 3/5] feat(platforms): update platforms.json to include new services and correct icon URLs --- resources/platforms.json | 39 +-------------------------------------- 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/resources/platforms.json b/resources/platforms.json index b519c2d..4735e15 100644 --- a/resources/platforms.json +++ b/resources/platforms.json @@ -1,38 +1 @@ -[ - { - "name": "gmail", - "shortcode": "g", - "service_type": "email", - "protocol_type": "oauth2", - "icon_svg": "https://raw.githubusercontent.com/smswithoutborders/SMSWithoutBorders-Publisher/main/resources/icons/gmail.svg", - "icon_png": "https://raw.githubusercontent.com/smswithoutborders/SMSWithoutBorders-Publisher/main/resources/icons/gmail.png", - "support_url_scheme": false - }, - { - "name": "twitter", - "shortcode": "t", - "service_type": "text", - "protocol_type": "oauth2", - "icon_svg": "https://raw.githubusercontent.com/smswithoutborders/SMSWithoutBorders-Publisher/main/resources/icons/twitter.svg", - "icon_png": "https://raw.githubusercontent.com/smswithoutborders/SMSWithoutBorders-Publisher/main/resources/icons/twitter.png", - "support_url_scheme": true - }, - { - "name": "telegram", - "shortcode": "T", - "service_type": "message", - "protocol_type": "pnba", - "icon_svg": "https://raw.githubusercontent.com/smswithoutborders/SMSWithoutBorders-Publisher/main/resources/icons/telegram.svg", - "icon_png": "https://raw.githubusercontent.com/smswithoutborders/SMSWithoutBorders-Publisher/main/resources/icons/telegram.png", - "support_url_scheme": false - }, - { - "name": "reliability", - "shortcode": "r", - "service_type": "test", - "protocol_type": "event", - "icon_svg": "https://raw.githubusercontent.com/smswithoutborders/SMSWithoutBorders-Publisher/staging/resources/icons/reliability.svg", - "icon_png": "https://raw.githubusercontent.com/smswithoutborders/SMSWithoutBorders-Publisher/staging/resources/icons/reliability.png", - "support_url_scheme": false - } -] +[{"name":"gmail","shortcode":"g","protocol_type":"oauth2","service_type":"email","icon_svg":"https://raw.githubusercontent.com/smswithoutborders/gmail-oauth2-adapter/main/icons/gmail.svg","icon_png":"https://raw.githubusercontent.com/smswithoutborders/gmail-oauth2-adapter/main/icons/gmail.png","support_url_scheme":false},{"name":"mastodon","shortcode":"m","protocol_type":"oauth2","service_type":"text","icon_svg":"https://raw.githubusercontent.com/smswithoutborders/mastodon-oauth2-adapter/main/icons/mastodon.svg","icon_png":"https://raw.githubusercontent.com/smswithoutborders/mastodon-oauth2-adapter/main/icons/mastodon.png","support_url_scheme":false},{"name":"telegram","shortcode":"T","protocol_type":"pnba","service_type":"message","icon_svg":"https://raw.githubusercontent.com/smswithoutborders/telegram-pnba-adapter/main/icons/telegram.svg","icon_png":"https://raw.githubusercontent.com/smswithoutborders/telegram-pnba-adapter/main/icons/telegram.png","support_url_scheme":false},{"name":"bluesky","shortcode":"b","protocol_type":"oauth2","service_type":"text","icon_svg":"https://raw.githubusercontent.com/smswithoutborders/bluesky-oauth2-adapter/main/icons/bluesky.svg","icon_png":"https://raw.githubusercontent.com/smswithoutborders/bluesky-oauth2-adapter/main/icons/bluesky.png","support_url_scheme":false},{"name":"reliability","shortcode":"r","protocol_type":"event","service_type":"test","icon_svg":"https://raw.githubusercontent.com/smswithoutborders/reliability-event-adapter/main/icons/reliability.svg","icon_png":"https://raw.githubusercontent.com/smswithoutborders/reliability-event-adapter/main/icons/reliability.png","support_url_scheme":false},{"name":"twitter","shortcode":"t","protocol_type":"oauth2","service_type":"text","icon_svg":"https://raw.githubusercontent.com/smswithoutborders/twitter-oauth2-adapter/main/icons/twitter.svg","icon_png":"https://raw.githubusercontent.com/smswithoutborders/twitter-oauth2-adapter/main/icons/twitter.png","support_url_scheme":true}] \ No newline at end of file From 70f8facfb255254cdac180926699536f08a0bc72 Mon Sep 17 00:00:00 2001 From: Promise Fru Date: Wed, 15 Oct 2025 14:04:47 +0100 Subject: [PATCH 4/5] Update Python base image version in Dockerfile --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index f926e32..2f6019c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.14.0-slim +FROM python:3.13.7-slim WORKDIR /publisher @@ -19,7 +19,7 @@ RUN --mount=type=cache,sharing=locked,target=/var/cache/apt \ COPY requirements.txt . RUN --mount=type=cache,sharing=locked,target=/root/.cache/pip \ - pip install --disable-pip-version-check --quiet --no-cache-dir -r requirements.txt + pip install --disable-pip-version-check -r requirements.txt COPY . . From 10471f9d0c19de6401dbe30ffe596c322d411452 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Oct 2025 17:19:41 +0000 Subject: [PATCH 5/5] chore(deps): bump the production-dependencies group with 4 updates Bumps the production-dependencies group with 4 updates: [fastapi[standard]](https://github.com/fastapi/fastapi), [phonenumbers](https://github.com/daviddrysdale/python-phonenumbers), [sentry-sdk[grpcio]](https://github.com/getsentry/sentry-python) and [twilio](https://github.com/twilio/twilio-python). Updates `fastapi[standard]` from 0.118.0 to 0.119.1 - [Release notes](https://github.com/fastapi/fastapi/releases) - [Commits](https://github.com/fastapi/fastapi/compare/0.118.0...0.119.1) Updates `phonenumbers` from 9.0.15 to 9.0.16 - [Commits](https://github.com/daviddrysdale/python-phonenumbers/compare/v9.0.15...v9.0.16) Updates `sentry-sdk[grpcio]` from 2.40.0 to 2.42.1 - [Release notes](https://github.com/getsentry/sentry-python/releases) - [Changelog](https://github.com/getsentry/sentry-python/blob/master/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-python/compare/2.40.0...2.42.1) Updates `twilio` from 9.8.3 to 9.8.4 - [Release notes](https://github.com/twilio/twilio-python/releases) - [Changelog](https://github.com/twilio/twilio-python/blob/main/CHANGES.md) - [Commits](https://github.com/twilio/twilio-python/compare/9.8.3...9.8.4) --- updated-dependencies: - dependency-name: fastapi[standard] dependency-version: 0.119.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production-dependencies - dependency-name: phonenumbers dependency-version: 9.0.16 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: sentry-sdk[grpcio] dependency-version: 2.42.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production-dependencies - dependency-name: twilio dependency-version: 9.8.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies ... Signed-off-by: dependabot[bot] --- requirements.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index db7198a..a354d41 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,13 +1,13 @@ -fastapi[standard]==0.118.0 +fastapi[standard]==0.119.1 GitPython==3.1.45 grpc-interceptor==0.15.4 grpcio==1.75.1 grpcio-testing==1.75.1 grpcio-tools==1.75.1 peewee>=3.17.8 -phonenumbers==9.0.15 +phonenumbers==9.0.16 pymysql==1.1.2 requests==2.32.5 -sentry-sdk[grpcio]==2.40.0 +sentry-sdk[grpcio]==2.42.1 tqdm==4.67.1 -twilio==9.8.3 +twilio==9.8.4