From 37ef24e1658271882d88999ac5c96c609da8fdf1 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Fri, 10 Feb 2023 21:25:25 +0000 Subject: [PATCH] Bug 32316: Send list share invites and accepts immediately For emails triggered manually it's save and helpful to send them immediately. This patch takes care of SHARE_INVITE and SHARE_ACCEPT. To test: * Enable OpacAllowSharingPrivateLists * Configure SMTP servers * Set KohaAdminEmailAddress and an email address in your user * Create a private list in the OPAC * Share the list with your email * Verify that you receive the email immediately (in the message_queue the status will be sent) * Create a second user to log into the OPAC with * Log out of the OPAC * Click on the link in the invite email or copy/paste it to the browser * Log in as your second user so the list is shared * Verify that the list acceptance email was sent immediately as well --- Koha.pm | 2 +- .../bug_30642-add_renewal_type.pl => db_revs/221200004.pl} | 0 opac/opac-shareshelf.pl | 3 ++- 3 files changed, 3 insertions(+), 2 deletions(-) rename installer/data/mysql/{atomicupdate/bug_30642-add_renewal_type.pl => db_revs/221200004.pl} (100%) diff --git a/Koha.pm b/Koha.pm index 0887f96e44..ad6f1828b8 100644 --- a/Koha.pm +++ b/Koha.pm @@ -29,7 +29,7 @@ use vars qw{ $VERSION }; # - #4 : the developer version. The 4th number is the database subversion. # used by developers when the database changes. updatedatabase take care of the changes itself # and is automatically called by Auth.pm when needed. -$VERSION = "22.12.00.003"; +$VERSION = "22.12.00.004"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_30642-add_renewal_type.pl b/installer/data/mysql/db_revs/221200004.pl similarity index 100% rename from installer/data/mysql/atomicupdate/bug_30642-add_renewal_type.pl rename to installer/data/mysql/db_revs/221200004.pl diff --git a/opac/opac-shareshelf.pl b/opac/opac-shareshelf.pl index 29edd82293..ca3f96063d 100755 --- a/opac/opac-shareshelf.pl +++ b/opac/opac-shareshelf.pl @@ -177,7 +177,7 @@ sub notify_owner { ); #send letter to queue - C4::Letters::EnqueueLetter( + my $message_id = C4::Letters::EnqueueLetter( { letter => $letter, message_transport_type => 'email', @@ -185,6 +185,7 @@ sub notify_owner { to_address => $toaddr, } ); + C4::Letters::SendQueuedMessages({ message_id => $message_id }); } sub process_addrlist { -- 2.30.2