Author Topic: Problem with Accounts Plugin when used with sound_notifier  (Read 5501 times)

Offline deltatech

  • Jr. Member
  • **
  • Posts: 41
The accounts plugin is great, and so is the webmail notifier [edit: sound_notifier, see below], but when you use the two together, there is a big problem.

When you select an account other than the main account, the webmail notifier notifies you once per minute even if there are no new messages.  This does not stop until you select the main account.
« Last Edit: May 09, 2011, 02:39:33 AM by rosali »

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Problem with Accounts Plugin when used with sound_notifier
« Reply #1 on: May 09, 2011, 02:06:03 AM »
Could you please describe a little bit more exactly.

Settings of Webmail Notifier FF plugin etc.

I don't see the problem.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline deltatech

  • Jr. Member
  • **
  • Posts: 41
Problem with Accounts Plugin when used with sound_notifier
« Reply #2 on: May 09, 2011, 02:10:17 AM »
Quote from: rosali;34744
Could you please describe a little bit more exactly.

Settings of Webmail Notifier FF plugin etc.

I don't see the problem.


Sorry, i don't know what i was thinking.. It isn't Webmail Notifier, it is Sound Notifier.

To duplicate the problem, all you have to do is assign a sound to notifiy when messages come in.   Then go select an account other than the primary account and wait.  Once per minute, an alert will go off until you switch back to the main account.

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Problem with Accounts Plugin when used with sound_notifier
« Reply #3 on: May 09, 2011, 03:14:09 AM »
sound_notifier.php

Replace method 'play_sound' by:


  
function play_sound($args){
    
$rcmail rcmail::get_instance();
    if(
$rcmail->config->get('sound_notifier') && strtolower($_SESSION['username']) == strtolower($rcmail->user->data['username']))
      
$rcmail->output->command("plugin.sound");
  }


Please post, if it behaves now as desired. Notice that it will not play sounds for remote accounts. This is not possible, because the plugin uses the 'new_messages' hook which checks only for new messages arriving in the default account.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline deltatech

  • Jr. Member
  • **
  • Posts: 41
Problem with Accounts Plugin when used with sound_notifier
« Reply #4 on: May 09, 2011, 12:38:07 PM »
Quote from: rosali;34747
sound_notifier.php

Replace method 'play_sound' by:


  
function play_sound($args){
    
$rcmail rcmail::get_instance();
    if(
$rcmail->config->get('sound_notifier') && strtolower($_SESSION['username']) == strtolower($rcmail->user->data['username']))
      
$rcmail->output->command("plugin.sound");
  }


Please post, if it behaves now as desired. Notice that it will not play sounds for remote accounts. This is not possible, because the plugin uses the 'new_messages' hook which checks only for new messages arriving in the default account.


That fixed the problem.  Thanks.