Skip to content

Commit

Permalink
fixed: deadloop during sending of GroupMail
Browse files Browse the repository at this point in the history
  • Loading branch information
jeabakker committed Sep 26, 2022
1 parent 45e6917 commit 4ee1b5d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions classes/GroupMail.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ protected function initializeAttributes() {
* @return string
*/
public function getSubject() {
return $this->title;
return $this->title ?? elgg_echo('group_tools:mail:message:default_subject', [$this->getContainerEntity()->getDisplayName()]);
}

/**
Expand Down Expand Up @@ -95,7 +95,7 @@ public function enqueue() {
return false;
}

elgg_trigger_event('enqueue', 'object', $this);
elgg_trigger_event('enqueue-mail', 'object', $this);

return true;
}
Expand Down
2 changes: 1 addition & 1 deletion elgg-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@
],
'object' => [
'group_tools_group_mail' => [
'enqueue' => GroupMailEnqueueNotificationEventHandler::class,
'enqueue-mail' => GroupMailEnqueueNotificationEventHandler::class,
],
]
],
Expand Down
1 change: 1 addition & 0 deletions languages/en.php
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@
'groups:tool:mail_members' => "Allow group members to mail other group members",
'groups:tool:mail_members:description' => "This will allow normal group members to send an e-mail to other group members. By default this is limited to group admins.",

'group_tools:mail:message:default_subject' => "Notification from the group %s",
'group_tools:mail:message:from' => "From group",

'group_tools:mail:title' => "Send a mail to the group members",
Expand Down
5 changes: 3 additions & 2 deletions languages/nl.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php
/**
* This file was created by Translation Editor v10.1.1
* On 2022-08-18 12:25
* This file was created by Translation Editor v11.0
* On 2022-09-26 11:59
*/

return array (
'group_tools:mail:message:default_subject' => 'Bericht uit de groep %s',
'groups:tool:group_multiple_admin_allow:description' => 'Laat groepsbeheerders andere groepsbeheerders beheren. Normaal kan alleen de groepseigenaar dit beheren.',
'groups:tool:related_groups:description' => 'Toon een lijst met gerelateerde groepen aan de leden van deze groep.',
'group_tools:welcome_message:notifications' => 'Activiteiten binnen deze groep kunnen notificaties versturen.
Expand Down

0 comments on commit 4ee1b5d

Please sign in to comment.