bugfix empty messages saved...
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
a5cfbf854d
commit
a65d4f1a69
@ -78,11 +78,8 @@ 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 == nil {
|
if len(fs_msg.Chat) > 0 || fs_msg.Invitation.Step == 3 {
|
||||||
|
// chat or invitation answer => save the server message
|
||||||
// todo: manage non usermessage, like serverlists
|
|
||||||
|
|
||||||
} else { // chat or invitation answer => save the server message
|
|
||||||
|
|
||||||
out, err := proto.Marshal(fs_msg)
|
out, err := proto.Marshal(fs_msg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -93,6 +90,8 @@ func CheckForMessages(storage_path string, job *client.RequestsJob) (int, string
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
count = len(fs_msg.Chat)
|
count = len(fs_msg.Chat)
|
||||||
|
} else {
|
||||||
|
// manage non uszer messages like devices or server
|
||||||
}
|
}
|
||||||
|
|
||||||
return count, "", nil
|
return count, "", nil
|
||||||
|
Loading…
Reference in New Issue
Block a user