Bug 30646: (follow-up) Set to send immediately

Other welcome notices send immediately rather than waiting on the queue
to be processed.. these one's should too.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Martin Renvoize 2022-06-16 15:23:28 +01:00 committed by Tomas Cohen Arazi
parent a951e6d131
commit 7a21a76a06
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
2 changed files with 5 additions and 2 deletions

View File

@ -23,7 +23,7 @@ use Carp qw( croak );
use C4::Context;
use C4::Members::Messaging;
use C4::Auth qw( checkpw_internal );
use C4::Letters qw( GetPreparedLetter EnqueueLetter );
use C4::Letters qw( GetPreparedLetter EnqueueLetter SendQueuedMessages );
use Koha::Patrons;
use Koha::AuthUtils qw( hash_password );
use Net::LDAP;
@ -260,6 +260,8 @@ sub checkpw_ldap {
message_transport_type => 'email'
}
);
C4::Letters::SendQueuedMessages( { message_id => $message_id } );
}
}
} else {

View File

@ -23,7 +23,7 @@ use C4::Context;
use Koha::AuthUtils qw( get_script_name );
use Koha::Database;
use Koha::Patrons;
use C4::Letters qw( GetPreparedLetter EnqueueLetter );
use C4::Letters qw( GetPreparedLetter EnqueueLetter SendQueuedMessages );
use C4::Members::Messaging;
use Carp qw( carp );
use List::MoreUtils qw( any );
@ -169,6 +169,7 @@ sub _autocreate {
message_transport_type => 'email'
}
);
C4::Letters::SendQueuedMessages( { message_id => $message_id } );
}
}
return ( 1, $patron->cardnumber, $patron->userid );