From a65d4f1a69ce5fd3c790424ed6f479e521c4303e Mon Sep 17 00:00:00 2001 From: ycc Date: Fri, 29 Mar 2024 19:25:15 +0100 Subject: [PATCH] bugfix empty messages saved... --- client/helpers/backgroundHelper.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/client/helpers/backgroundHelper.go b/client/helpers/backgroundHelper.go index fd5c0e0..d2fc8e2 100644 --- a/client/helpers/backgroundHelper.go +++ b/client/helpers/backgroundHelper.go @@ -78,11 +78,8 @@ func CheckForMessages(storage_path string, job *client.RequestsJob) (int, string if err != nil { return -1, "CheckMessages: ProcessInboundServerResponse", err } - if len(fs_msg.Chat) == 0 && fs_msg.Invitation == nil { - - // todo: manage non usermessage, like serverlists - - } else { // chat or invitation answer => save the server message + if len(fs_msg.Chat) > 0 || fs_msg.Invitation.Step == 3 { + // chat or invitation answer => save the server message out, err := proto.Marshal(fs_msg) if err != nil { @@ -93,6 +90,8 @@ func CheckForMessages(storage_path string, job *client.RequestsJob) (int, string } } count = len(fs_msg.Chat) + } else { + // manage non uszer messages like devices or server } return count, "", nil