revert renaming "sender" to "from" to maintain backwards compatibility
This commit is contained in:
parent
1f5a963d78
commit
8beec340d3
2
api.lua
2
api.lua
@ -67,7 +67,7 @@ function mail.send(src, dst, subject, body)
|
|||||||
-- form the actual mail
|
-- form the actual mail
|
||||||
local msg = {
|
local msg = {
|
||||||
unread = true,
|
unread = true,
|
||||||
from = m.from,
|
sender = m.from,
|
||||||
to = m.to,
|
to = m.to,
|
||||||
subject = m.subject,
|
subject = m.subject,
|
||||||
body = m.body,
|
body = m.body,
|
||||||
|
10
gui.lua
10
gui.lua
@ -60,7 +60,7 @@ function mail.show_inbox(name)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
formspec[#formspec + 1] = ","
|
formspec[#formspec + 1] = ","
|
||||||
formspec[#formspec + 1] = minetest.formspec_escape(message.from)
|
formspec[#formspec + 1] = minetest.formspec_escape(message.sender)
|
||||||
formspec[#formspec + 1] = ","
|
formspec[#formspec + 1] = ","
|
||||||
if message.subject ~= "" then
|
if message.subject ~= "" then
|
||||||
if string.len(message.subject) > 30 then
|
if string.len(message.subject) > 30 then
|
||||||
@ -102,7 +102,7 @@ function mail.show_message(name, msgnumber)
|
|||||||
button[6,8.5;2,1;delete;Delete]
|
button[6,8.5;2,1;delete;Delete]
|
||||||
]] .. theme
|
]] .. theme
|
||||||
|
|
||||||
local from = minetest.formspec_escape(message.from)
|
local from = minetest.formspec_escape(message.sender)
|
||||||
local to = minetest.formspec_escape(message.to)
|
local to = minetest.formspec_escape(message.to)
|
||||||
local cc = minetest.formspec_escape(message.cc)
|
local cc = minetest.formspec_escape(message.cc)
|
||||||
local subject = minetest.formspec_escape(message.subject)
|
local subject = minetest.formspec_escape(message.subject)
|
||||||
@ -144,7 +144,7 @@ end
|
|||||||
function mail.reply(name, message)
|
function mail.reply(name, message)
|
||||||
mail.ensure_new_format(message)
|
mail.ensure_new_format(message)
|
||||||
local replyfooter = "Type your reply here.\n\n--Original message follows--\n" ..message.body
|
local replyfooter = "Type your reply here.\n\n--Original message follows--\n" ..message.body
|
||||||
mail.show_compose(name, message.from, "Re: "..message.subject, replyfooter)
|
mail.show_compose(name, message.sender, "Re: "..message.subject, replyfooter)
|
||||||
end
|
end
|
||||||
|
|
||||||
function mail.replyall(name, message)
|
function mail.replyall(name, message)
|
||||||
@ -152,8 +152,8 @@ function mail.replyall(name, message)
|
|||||||
local replyfooter = "Type your reply here.\n\n--Original message follows--\n" ..message.body
|
local replyfooter = "Type your reply here.\n\n--Original message follows--\n" ..message.body
|
||||||
-- new recipients are the sender plus the original recipients, minus ourselves
|
-- new recipients are the sender plus the original recipients, minus ourselves
|
||||||
local recipients = message.to
|
local recipients = message.to
|
||||||
if message.from ~= nil then
|
if message.sender ~= nil then
|
||||||
recipients = message.from .. ", " .. recipients
|
recipients = message.sender .. ", " .. recipients
|
||||||
end
|
end
|
||||||
recipients = mail.parse_player_list(recipients)
|
recipients = mail.parse_player_list(recipients)
|
||||||
for k,v in pairs(recipients) do
|
for k,v in pairs(recipients) do
|
||||||
|
BIN
test/auth.sqlite
BIN
test/auth.sqlite
Binary file not shown.
@ -50,7 +50,6 @@ end
|
|||||||
|
|
||||||
function mail.ensure_new_format(message)
|
function mail.ensure_new_format(message)
|
||||||
if message.sender then
|
if message.sender then
|
||||||
message.from = message.sender
|
|
||||||
message.to = name
|
message.to = name
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user