Skip to content

Commit

Permalink
Further logging of messenger related to issue #383
Browse files Browse the repository at this point in the history
  • Loading branch information
brightrim committed Oct 20, 2023
1 parent 208e673 commit 7a25b84
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion content/messenger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,20 @@ local contents = {}
local texts = {text1, text2, text3, text4}
table.insert(contents, {text = text1, sender = signature})
spawnParchment(recipient, texts, signature, descriptionEn, descriptionDe)
else
log("Message "..i.." out of "..numberOfMessages.." to be received by "..recipient.name.."("..recipient.id..") failed to be sent. Texts found: "..tostring(foundText1).." "..tostring(foundText2).." "..tostring(foundText3).." "..tostring(foundText4).." ".." Signature found: "..tostring(foundSignature).." Descriptions found: "..tostring(foundDescriptionEn).." "..tostring(foundDescriptionDe))
end
end

if tonumber(numberOfMessages) > 0 then
if tonumber(#contents) > 0 then
logThatMessagesWereReceived(recipient, contents)
end

if tonumber(#contents) ~= tonumber(numberOfMessages) then
local failed = tonumber(numberOfMessages) - tonumber(#contents)
log(failed.." messages meant for "..recipient.name.."("..recipient.id..")".."failed to send!")
end

ScriptVars:set(recipient.id.."storedMessages", "0")

local callback = function(dialog)
Expand Down

0 comments on commit 7a25b84

Please sign in to comment.