Skip to content

Commit

Permalink
New hooks: listeners.failed_login and fetch_emails.set_seen_flag #4407
Browse files Browse the repository at this point in the history
…from vtq221/master

New hooks: listeners.failed_login and fetch_emails.set_seen_flag
  • Loading branch information
freescout-help-desk authored Dec 7, 2024
2 parents 51dbe56 + f4fea34 commit b887113
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/Console/Commands/FetchEmails.php
Original file line number Diff line number Diff line change
Expand Up @@ -1618,7 +1618,8 @@ public function createCustomers($emails, $exclude_emails)

public function setSeen($message, $mailbox)
{
$message->setFlag(['Seen']);
$flag = \Eventy::filter('fetch_emails.set_seen_flag', ['Seen'], $message, $mailbox);
$message->setFlag($flag);
\Eventy::action('fetch_emails.after_set_seen', $message, $mailbox, $this);
}
}
2 changes: 2 additions & 0 deletions app/Listeners/LogFailedLogin.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ public function __construct()
*/
public function handle(Failed $event)
{
\Eventy::action('listeners.failed_login', $event);

activity()
//->causedBy($event->user)
->withProperties(['ip' => app('request')->ip(), 'email' => request()->email])
Expand Down

0 comments on commit b887113

Please sign in to comment.