mstilkerich / rcmcarddav

CardDAV plugin for RoundCube Webmailer
GNU General Public License v2.0
256 stars 81 forks source link

send a notification to the user. #443

Closed quenenni closed 1 year ago

quenenni commented 1 year ago

Hello,

Just a note from my work.

We finally managed to update our system in production. The synchronisation between Roundcube and Nextcloud via the app password token is working perfectly. You really helped us a lot. Thank you.

There is still a situation where we have a problem. When a new user starts using our services, for the addressbooks synchro between RC and NC to work, the user has to enter 1 time the cloud in order to initialize its profil.

Instead of trying to detect that situation and initialize by ourselves the user profil in NC, we would like to pop up a msg in RC.

I know how to add info in logs, but I didn't find how to do to send a message to the user UI. Do you know how to do it?

[EDIT] I know I can send an error notification by using a "throw new Exception", but I don't know how to send a notification in Green, not red (or even if I can choose my color).

quenenni commented 1 year ago

I found the way to send the notice to the user.

I was trying to instanciate rcmail class (it was working that way with RC 1.5 and carddav plugin before v5). Now, I had just to use the rcube instanciation:

$rcube = rcube::get_instance();
$rcube->output->show_message('blablabla', 'notice', null, false);