Jump to content

Message system


HawkXP71

Recommended Posts

HawkXP71

Couple message system feature requests.  They may already exist but the term "message" is so prevalent its hard to find, feel free to point me to other requests if they already exist

  •  Add the ability to add messages to every user, that they see the next time the log in.  Ideally they would have an expiration date.  For instance, "Server will be shut down for maintenence on MM/DD/YYYY" that would expire the day after.  So if they didnt log in, they would never get it.
  • Add ability for users to send a message to the admins.  
  • Add ability to send a message as an email

    ~thanks

 

  • Like 2
Link to comment
Share on other sites

This plugin here will create and save messages that get sent when users login.

https://github.com/chefbennyj1/Emby.MessageUsers

 

There is a new feature getting released in emby that allows users to access plugin configuration pages. This plugin could be altered when that new functionality is released, to allow users to send messages to admins.

As for email, that could also be added fairly easily to this plugin as well.

So, yeah probabaly all of the above is possible.

  • Like 4
Link to comment
Share on other sites

rbjtech
On 06/12/2022 at 05:38, chef said:

This plugin here will create and save messages that get sent when users login.

https://github.com/chefbennyj1/Emby.MessageUsers

 

There is a new feature getting released in emby that allows users to access plugin configuration pages. This plugin could be altered when that new functionality is released, to allow users to send messages to admins.

As for email, that could also be added fairly easily to this plugin as well.

So, yeah probabaly all of the above is possible.

Hi @chef - I had a quick look on Git and believe this is just using the same Emby messaging API we used for the IntroSkip Plugin yes ?

A couple of things that would make it really useful is a time on screen option (ie, no need to acknowledge) and a message 'date/time to live' function.  ie if outside it's TTL - then the message is not delivered, it's just deleted.  This would be useful for system maintenance etc - no point displaying it to users if it's already been completed.  It may also be an idea to append the date/time the message was created on the actual message ?

I may have a little play when I get some time.

btw - any reason this is not in the catalogue ?  As it seems a very useful thing to have .. 

Edited by rbjtech
  • Like 2
Link to comment
Share on other sites

  • 5 months later...
svdasein

@chefAre there build instructions for Emby.MessageUsers or alternatively is there a pre-built binary somewhere?  I've been wanting some kind of messaging thing forever & just found your work.  I don't have a build env though so I'm just left drooling...

Link to comment
Share on other sites

chef
10 minutes ago, svdasein said:

@chefAre there build instructions for Emby.MessageUsers or alternatively is there a pre-built binary somewhere?  I've been wanting some kind of messaging thing forever & just found your work.  I don't have a build env though so I'm just left drooling...

I have a built DLL. When I return home from work I'll send it. 👍😃

EDIT: hey look at that... It is already sitting in my emby community resource file list... So yeah! There it is:

 

MessageUsers.zip

Edited by chef
  • Like 1
Link to comment
Share on other sites

darkassassin07

There's a built .dll on the Github repository as well once you click on the 1.0.0.1 release (not sure if @chef's is up to date if it's been sitting on the forums). I think I'll have a play with that as well once I'm off work.

 

 

/edit, just saw the name on the repository, didn't realize you were the creator Chef.... Probably got a recent build.... 🤷

Edited by darkassassin07
Link to comment
Share on other sites

darkassassin07
On 12/5/2022 at 9:38 PM, chef said:

This plugin here will create and save messages that get sent when users login.

https://github.com/chefbennyj1/Emby.MessageUsers

 

There is a new feature getting released in emby that allows users to access plugin configuration pages. This plugin could be altered when that new functionality is released, to allow users to send messages to admins.

As for email, that could also be added fairly easily to this plugin as well.

So, yeah probabaly all of the above is possible.

Well, I've installed this plugin and done a bit of testing using a test user and 3/4 clients: the web app via chrome Android and Chrome Win10, the XboxOne app, and Emby for Android.

In all 4 cases: a client that is already logged in when a message is sent will receive that message upon loading any new page, but if not already logged in; upon login the message disappears from the 'saved messages' queue, while displaying nothing to the client.

Tested mostly through an nginx RP with websockets enabled, but I got the same results testing via the web app/browser + localhost.

 

 

I did also find if a user is signed into multiple devices (android + a browser for example) it's pretty hit or miss which client receives the message. Android app is logged in and running in the background, while I'm actively browsing the web app and loading new pages on a desktop browser, but the message regularly goes to the inactive android client instead. (it's siting waiting for confirmation when I bring it back to the foreground)

 

Beyond that, if you are using the dark settings theme, the saved messages  section shows up as white text on a white background making it entirely invisible until you highlight it (desktop web app only, nothing else I tested lets you select/highlight the text to be able to see it).

 

 

It's a great concept that I'd love to see developed further. I've often found myself wanting to leave messages that clients would receive next time they login. I don't necessarily want to bother people immediately for stuff that's only relevant to emby and can be left till they next want to use the server. Especially things like upcoming maintenance messages.

If you're expanding features at all: a history/delivery report would be awesome. Info on what was delivered, when, and to what client/device. Perhaps even an option to select which client/device to deliver a message to.

Edited by darkassassin07
Link to comment
Share on other sites

chef
15 minutes ago, darkassassin07 said:

Well, I've installed this plugin and done a bit of testing using a test user and 3/4 clients: the web app via chrome Android and Chrome Win10, the XboxOne app, and Emby for Android.

In all 4 cases: a client that is already logged in when a message is sent will receive that message upon loading any new page, but if not already logged in; upon login the message disappears from the 'saved messages' queue, while displaying nothing to the client.

Tested mostly through an nginx RP with websockets enabled, but I got the same results testing via the web app/browser + localhost.

 

 

I did also find if a user is signed into multiple devices (android + a browser for example) it's pretty hit or miss which client receives the message. Android app is logged in and running in the background, while I'm actively browsing the web app and loading new pages on a desktop browser, but the message regularly goes to the inactive android client instead. (it's siting waiting for confirmation when I bring it back to the foreground)

 

Beyond that, if you are using the dark settings theme, the saved messages  section shows up as white text on a white background making it entirely invisible until you highlight it (desktop web app only, nothing else I tested lets you select/highlight the text to be able to see it).

 

 

It's a great concept that I'd love to see developed further. I've often found myself wanting to leave messages that clients would receive next time they login. I don't necessarily want to bother people immediately for stuff that's only relevant to emby and can be left till they next want to use the server. Especially things like upcoming maintenance messages.

If you're expanding features at all: a history/delivery report would be awesome. Info on what was delivered, when, and to what client/device. Perhaps even an option to select which client/device to deliver a message to.

Nice work.

I'll have to load this project and take a look.

Some clients don't have the ability to accept messages.

But, it sound like the clients you tested should accept them, so the code probabaly needs to be updated.

 

 

  • Like 1
Link to comment
Share on other sites

rbjtech

@chefBefore making any modifications - you may wanna catch up with the Luke et el - as they may have something like this on the radar given the recent security news.  

  • Like 2
Link to comment
Share on other sites

chef

@darkassassin07 I went through the code.

There a couple things I have noted.

One in particular: There really isn't away to get any feedback from the client that the message was shown.

We'll get an 'OK' response from the command over http, but this only seems to tell us that the device accepted the message command, not that it was actually shown on screen.

 

@rbjtech I'm going to update the plugin  libraries, and also make sure that any API header attributes are in inline with the new security.

This plugin is a good opportunity to test out how  the core has implemented the attributes for the custom API's.

Should give us an chance to learn and understand what they've done there.

 

I'm diving back into the code again. 

This was written so long ago, there are many... many code refactors to be made in there... LOL! I was really 'green' at the time I wrote this. LOL!

  • Like 2
Link to comment
Share on other sites

darkassassin07
57 minutes ago, chef said:

@darkassassin07 I went through the code.

There a couple things I have noted.

One in particular: There really isn't away to get any feedback from the client that the message was shown.

We'll get an 'OK' response from the command over http, but this only seems to tell us that the device accepted the message command, not that it was actually shown on screen.

Hmm. Well, messages do seem to reliably show when the user has already logged in; it's just the on-login messages I can't get to display. Perhaps a delay could work? Wait 10s or so after the login event to push the message?

Link to comment
Share on other sites

  • 4 months later...

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...