Skip to content

Commit

Permalink
Merge branch 'trunk' into refactored_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
purnimavenkatasubbu authored Nov 9, 2023
2 parents 08ddcac + 4947d9e commit 9709e98
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions packages/at_client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down
13 changes: 8 additions & 5 deletions packages/at_client/lib/src/rpc/at_rpc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion packages/at_client/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
##

Expand Down

0 comments on commit 9709e98

Please sign in to comment.