bugfix empty messages saved...
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
ycc 2024-03-29 19:25:15 +01:00
parent a5cfbf854d
commit a65d4f1a69

View File

@ -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