Fix condition for saving server message in backgroundHelper.go for nil safety
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
ycc 2024-03-31 17:58:41 +02:00
parent dfa2b5fa83
commit caab80f346

View File

@ -77,7 +77,7 @@ func CheckForMessages(storage_path string, job *client.RequestsJob) (int, string
if err != nil { if err != nil {
return -1, "CheckMessages: ProcessInboundServerResponse", err return -1, "CheckMessages: ProcessInboundServerResponse", err
} }
if len(fs_msg.Chat) > 0 || fs_msg.Invitation.Step == 3 { if len(fs_msg.Chat) > 0 || (fs_msg.Invitation != nil && fs_msg.Invitation.Step == 3) {
// chat or invitation answer => save the server message // chat or invitation answer => save the server message
out, err := proto.Marshal(fs_msg) out, err := proto.Marshal(fs_msg)