at_client_sdk icon indicating copy to clipboard operation
at_client_sdk copied to clipboard

Notifications sent to self never get a callback.

Open cconstab opened this issue 2 years ago • 5 comments

Describe the bug If an @ sign sends a notification to itself (to notify another client on the same @ sign the call back never gets called. This could be a bug or a limitation not sure but it had me scratching my head for a while To Reproduce Steps to reproduce the behavior:

  1. First write a small program that sends notification to yourself
  2. Then call notificationService.notify(NotificationParams.forUpdate(key, value: 'myvalue')
  3. And then wait and never get success or failure

Expected behavior Whether sending to yourself or another @ sign I would have expected the same behavor

Example

 AtClientManager atClientManager = AtClientManager.getInstance();

  NotificationService notificationService = atClientManager.notificationService;

  var metaData = Metadata()
    ..isPublic = false
    ..isEncrypted = true
    ..namespaceAware = true
    ..ttr = -1
    ..ttl = 90000;

  var key = AtKey()
    ..key = 'sshd'
    ..sharedBy = '@blueamateurbinding'
    ..sharedWith = '@blueamateurbinding'
    ..metadata = metaData;

  await notificationService
      .notify(NotificationParams.forUpdate(key, value: sshString),
          onSuccess: (notification) {
    _logger.info('SUCCESS:' + notification.toString() + ' ' + sshString);
  }, onError: (notification) {
    _logger.info('ERROR:' + notification.toString() + ' ' + sshString);
  });

onSuccess or onError never get called although all other clients do get the notification.

dart 2.10.4

  • Linux

Were you using an @‎application when the bug was found?

  • ssh trigger

Additional context Add any other context about the problem here.

cconstab avatar Apr 10 '22 05:04 cconstab

I think we should make this work... But interested in your PoV..

cconstab avatar Apr 10 '22 05:04 cconstab

Notifications were deliberately built for sending between different at-signs, it seems, so I think this is probably more of a feature request than a bug

I agree it's useful & I think we should do it once the notifications basics are rock solid

gkc avatar Apr 10 '22 20:04 gkc

migrated to enhancement

cconstab avatar Apr 10 '22 20:04 cconstab

@gkc or @cconstab is this still an active ticket? If so can you please assign a priority or close? TY!

ksanty avatar Jul 27 '22 17:07 ksanty

Still active. Will set to Medium priority

gkc avatar Jul 27 '22 17:07 gkc