sarpay
11/21/2019 - 6:46 PM

Notifications

var message = "This is a test notification, created at " + Clock.Now;

await _appNotifier.SendMessageAsync(
  AbpSession.ToUserIdentifier(), // or var user = await GetCurrentUserAsync();
  message,
  severity.ToPascalCase().ToEnum<NotificationSeverity>()
);

// -- or --

var user = await GetCurrentUserAsync();

await _appNotifier.SendMessageAsync(
  user.ToUserIdentifier(),
  message,
  severity.ToPascalCase().ToEnum<NotificationSeverity>()
);