diff --git a/src/actions/EmailAction.lua b/src/actions/EmailAction.lua index 25e21ff..f12a179 100644 --- a/src/actions/EmailAction.lua +++ b/src/actions/EmailAction.lua @@ -119,7 +119,7 @@ function _M.drawAttachRpc(agent, data) local attachments = getEmailAttachments(email) if attachments == "" then return end - local reward, change = role:award(attachments, {log = {desc = "draw_attach", int1 = emailId, key1 = email:getProperty("title")}}) + local reward, change = role:award(attachments, {log = {desc = "draw_attach", int1 = emailId}}) email:setProperty("status", 2) email:log(role, 2) SendPacket(actionCodes.Email_drawAttachRpc, MsgPack.pack({reward = reward, change = change})) @@ -134,10 +134,11 @@ function _M.checkRpc(agent, data) local msg = MsgPack.unpack(data) local id = msg.id - local email = require("models.Email").new({key = rds}) + local emailRds = string.format("email:%d:%s", roleId, id) + local email = require("models.Email").new({key = emailRds}) if not email:load() then return end - email:setProperty(rds, "status", 1) + email:setProperty("status", 1) email:log(role, 1) SendPacket(actionCodes.Email_checkRpc, '') -- libgit2 0.21.2