Jump to content

INotificationManager - NotificationRequest wants long integers, but should be GUID?


chef

Recommended Posts

In the NotificationRequest class the UserIds param would like an array of long integers. But I'm pretty sure it should be an array of GUID's because User Ids are usually GUIDs. 

 

I think.  @Luke 

Link to comment
Share on other sites

No, internally everything is based on the long id's now. Only beyond the borders of the api are the guids used.

  • Like 1
Link to comment
Share on other sites

Slightly confused here sir.

 

1. I have created my NotificationFactory class which has created the Notification options in the server. I have Enabled this notification.

        public IEnumerable<NotificationTypeInfo> GetNotificationTypes()
        {
           return new List<NotificationTypeInfo>
            {
                new NotificationTypeInfo
                {
                    Type = "foofoo",
                    Name = "fooBar",
                    Category = "System", //By the way this will not place the notification under System - it creates a new System heading
                    Enabled = true,
                    IsBasedOnUserEvent = false
                }
            };
           
        }

2. I have a scheduled task which runs once a day, and will trigger a notification like this:

            var request = new NotificationRequest()
            {
                Date = DateTimeOffset.Now,
                Description = "foo",
                Level = NotificationLevel.Warning,
                Name = "fooBar",
                NotificationType = "foofoo",
                SendToUserMode = SendToUserType.Admins,
                Url = "", //Is this an imageUrl or a link to more information? It's an empty url right now...
                UserIds = UserManager.Users.Where(i => i.Policy.IsAdministrator).Select(i => i.InternalId).ToArray()
            };

            await NotificationManager.SendNotification(request, CancellationToken.None).ConfigureAwait(false); 

My question is, what does the notification look like? is it the rectangle that is suppose to appear in the right corner of the browser?  

 

I just don;t see anything happen when I run the task, but I'm also not sure what I'm look for.

 

Thank you sir.

 

@@Luke

Link to comment
Share on other sites

I don't think I'm going completely crazy...

 

The emby wiki notifications section mentions one  built in notification system (https://support.emby.media/support/solutions/articles/44001159719-notifications) which might have been available on an older version of the server, but is not available anymore?

 

for piece of mind, the notifications (once setup) can only work with plugins (email pushalot etc..). There currently is no internal notification system, and we aren't (necessarily) able to access the Alert List on the dashboard? 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...