Move sending invitation email from hook_ENTITY_TYPE_insert to service

Created on 19 August 2024, 3 months ago

Problem/Motivation

Originally, Ginvite used a mail manager service to send the initiation emails, and this logic is located in the hook_ENTITY_TYPE_insert, making it impossible to decorate or alter the mail sending on the group_invitation relation creation.

Proposed resolution

Move the code from hook_ENTITY_TYPE_insert to the GroupInviteHandler, which will make it possible to decorate this service and replace the e-mail sending with a call to any other invitation server.

Feature request
Status

Active

Version

3.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @mariiadeny
  • Status changed to Needs review 3 months ago
  • 🇩🇪Germany geek-merlin Freiburg, Germany

    +1 for this, it makes the module more useful.

    Code review: Looks solid, after all it's just moving code around and making it pluggable.

    Did not test it (and the module has not moved its tests to gitlab ci).

    @mariia: You may want to learn adding MRs, it has lots of benefits (maintainers often like it, gitlab ci, and more :-).

Production build 0.71.5 2024