mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-17 14:37:02 +00:00
aliases: Simplify lookup logic, remove alias-exists hook
This patch simplifies the internal alias lookup logic, unifying it across Resolve and Exists. As part of this, the `alias-exists` hook is removed. It was redundant to begin with, although it enabled a potential optimization, it isn't worth the complexity. The timeout for execution of both was the same. This change should be backwards-compatible because `alias-resolve` is still used, and the semantics haven't changed.
This commit is contained in:
@@ -25,7 +25,6 @@ function send_and_check() {
|
||||
|
||||
# Remove the hooks that could be left over from previous failed tests.
|
||||
rm -f config/hooks/alias-resolve
|
||||
rm -f config/hooks/alias-exists
|
||||
|
||||
# Test email aliases.
|
||||
send_and_check pepe jose
|
||||
@@ -46,7 +45,6 @@ mail_diff content .data/pipe_alias_worked
|
||||
|
||||
# Set up the hooks.
|
||||
mkdir -p config/hooks/
|
||||
cp alias-exists-hook config/hooks/alias-exists
|
||||
cp alias-resolve-hook config/hooks/alias-resolve
|
||||
|
||||
# Test email aliases.
|
||||
@@ -70,6 +68,5 @@ fi
|
||||
|
||||
# Remove the hooks, leave a clean state.
|
||||
rm -f config/hooks/alias-resolve
|
||||
rm -f config/hooks/alias-exists
|
||||
|
||||
success
|
||||
|
||||
Reference in New Issue
Block a user