This commit is contained in:
@ -103,7 +103,7 @@ func SaveCheckJobs() (string, error) {
|
||||
}
|
||||
|
||||
// ReadMessage
|
||||
func ReadMessage(messageFilename string, storagePath string) (string, string, error) {
|
||||
func ReadMessage(messageFilename string, detachFilesStoragePath string) (string, string, error) {
|
||||
result := map[string]interface{}{}
|
||||
|
||||
// read message file
|
||||
@ -119,7 +119,7 @@ func ReadMessage(messageFilename string, storagePath string) (string, string, er
|
||||
}
|
||||
// check if invitation answer
|
||||
if fromServerMessage.Invitation != nil {
|
||||
|
||||
InvitationGetAnswerReadResponse(fromServerMessage.Invitation)
|
||||
}
|
||||
// Chat messages
|
||||
if len(fromServerMessage.Chat) > 0 {
|
||||
@ -146,7 +146,7 @@ func ReadMessage(messageFilename string, storagePath string) (string, string, er
|
||||
filename := uuid.New().String() + "_" + file.Filename
|
||||
filenames = append(filenames, filename)
|
||||
// detach file
|
||||
os.WriteFile(filepath.Join(storagePath, "files", filename), file.Data, 0600)
|
||||
os.WriteFile(filepath.Join(detachFilesStoragePath, "files", filename), file.Data, 0600)
|
||||
}
|
||||
//? result["invitation finalized"] = peer.Name
|
||||
}
|
||||
|
Reference in New Issue
Block a user