From 7a25b84677b0395258728d246bbbc6f7c68c777e Mon Sep 17 00:00:00 2001 From: brightrim Date: Fri, 20 Oct 2023 18:47:17 +0200 Subject: [PATCH] Further logging of messenger related to issue #383 --- content/messenger.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/content/messenger.lua b/content/messenger.lua index a8dd9f5e2..ec3b8fa81 100644 --- a/content/messenger.lua +++ b/content/messenger.lua @@ -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)