From 208f8bf7d73f2d54e06b219f536e96c1162c4a8c Mon Sep 17 00:00:00 2001 From: gkc Date: Sun, 29 Oct 2023 12:21:17 +0000 Subject: [PATCH 1/3] feat: have AtRpc send ephemeral notifications --- packages/at_client/lib/src/rpc/at_rpc.dart | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/at_client/lib/src/rpc/at_rpc.dart b/packages/at_client/lib/src/rpc/at_rpc.dart index 41aa7bb0c..3c06412ab 100644 --- a/packages/at_client/lib/src/rpc/at_rpc.dart +++ b/packages/at_client/lib/src/rpc/at_rpc.dart @@ -32,6 +32,8 @@ abstract class AtRpcCallbacks { class AtRpc { static final AtSignLogger logger = AtSignLogger('AtRpc'); + static Duration defaultNotificationExpiry = Duration(seconds: 30); + /// The [AtClient] used by this AtRpc final AtClient atClient; @@ -143,7 +145,9 @@ class AtRpc { logger.info( 'Sending notification ${requestRecordID.toString()} with payload $requestJson'); await atClient.notificationService.notify( - NotificationParams.forUpdate(requestRecordID, value: requestJson), + NotificationParams.forUpdate(requestRecordID, + value: requestJson, + notificationExpiry: defaultNotificationExpiry), checkForFinalDeliveryStatus: false, waitForFinalDeliveryStatus: false); sent = true; @@ -171,9 +175,7 @@ class AtRpc { final Metadata _defaultMetaData = Metadata() ..isPublic = false ..isEncrypted = true - ..namespaceAware = true - ..ttr = -1 - ..ttl = 60 * 60 * 1000; // 1 hour + ..namespaceAware = true; /// Not part of API, but visibleForTesting. /// Receives 'request' notifications, and @@ -343,7 +345,8 @@ class AtRpc { "Sending notification $responseAtKey with payload ${response.toJson()}"); await atClient.notificationService.notify( NotificationParams.forUpdate(responseAtKey, - value: jsonEncode(response.toJson())), + value: jsonEncode(response.toJson()), + notificationExpiry: defaultNotificationExpiry), checkForFinalDeliveryStatus: false, waitForFinalDeliveryStatus: false); sent = true; From 8e40ba737a423da16979746457d10e1722b2309a Mon Sep 17 00:00:00 2001 From: gkc Date: Sun, 29 Oct 2023 12:29:05 +0000 Subject: [PATCH 2/3] build: update at_client version for publish --- packages/at_client/CHANGELOG.md | 2 ++ packages/at_client/lib/src/preference/at_client_config.dart | 2 +- packages/at_client/pubspec.yaml | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/at_client/CHANGELOG.md b/packages/at_client/CHANGELOG.md index 7ee4f0f45..7f8989cc1 100644 --- a/packages/at_client/CHANGELOG.md +++ b/packages/at_client/CHANGELOG.md @@ -1,3 +1,5 @@ +## 3.0.68 +- feat: have AtRpc use ephemeral notifications ## 3.0.67 - feat: Make enrollment available to SyncService/NotificationService for authentication ## 3.0.66 diff --git a/packages/at_client/lib/src/preference/at_client_config.dart b/packages/at_client/lib/src/preference/at_client_config.dart index 683850a15..bf344f2cc 100644 --- a/packages/at_client/lib/src/preference/at_client_config.dart +++ b/packages/at_client/lib/src/preference/at_client_config.dart @@ -10,7 +10,7 @@ class AtClientConfig { /// Represents the at_client version. /// Must always be the same as the actual version in pubspec.yaml - final String atClientVersion = '3.0.67'; + final String atClientVersion = '3.0.68'; /// Represents the client commit log compaction time interval /// diff --git a/packages/at_client/pubspec.yaml b/packages/at_client/pubspec.yaml index 137fb8c39..797644aa6 100644 --- a/packages/at_client/pubspec.yaml +++ b/packages/at_client/pubspec.yaml @@ -4,7 +4,7 @@ description: The at_client library is the non-platform specific Client SDK which ## ## ## NB: When incrementing the version, please also increment the version in AtClientConfig file -version: 3.0.67 +version: 3.0.68 ## NB: When incrementing the version, please also increment the version in AtClientConfig file ## From 6b20ab07230e90774172efe76e21b2e164c46b4e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 9 Nov 2023 00:26:08 +0000 Subject: [PATCH 3/3] build(deps): bump actions/dependency-review-action from 3.1.1 to 3.1.2 Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 3.1.1 to 3.1.2. - [Release notes](https://github.com/actions/dependency-review-action/releases) - [Commits](https://github.com/actions/dependency-review-action/compare/9f45b2463b475767b61721ccfef113fef513e6aa...fde92acd0840415674c16b39c7d703fc28bc511e) --- updated-dependencies: - dependency-name: actions/dependency-review-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/dependency-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index 92d358bc1..97b8bb8d3 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -24,4 +24,4 @@ jobs: - name: 'Checkout Repository' uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: 'Dependency Review' - uses: actions/dependency-review-action@9f45b2463b475767b61721ccfef113fef513e6aa # v3.1.1 + uses: actions/dependency-review-action@fde92acd0840415674c16b39c7d703fc28bc511e # v3.1.2