mirror of
https://github.com/mt-mods/mail.git
synced 2025-07-17 19:56:37 -04:00
Implement non-player recipients
This commit is contained in:
parent
721d882c26
commit
3046f46414
6 changed files with 118 additions and 57 deletions
|
@ -2,11 +2,11 @@
|
|||
mtt.register("util/normalize_players_and_add_recipients", function(callback)
|
||||
local recipients = {}
|
||||
local undeliverable = {}
|
||||
local to = mail.normalize_players_and_add_recipients("player1,player2", recipients, undeliverable)
|
||||
local to = mail.normalize_players_and_add_recipients("sender", "player1,player2", recipients, undeliverable)
|
||||
|
||||
assert(to == "player1, player2")
|
||||
assert(not next(undeliverable))
|
||||
assert(recipients["player1"])
|
||||
assert(recipients["player2"])
|
||||
callback()
|
||||
end)
|
||||
end)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue