This commit is contained in:
@ -1,9 +1,7 @@
|
||||
package helpers
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
@ -144,9 +142,9 @@ func ReadMessage(messageFilename string, detachFilesStoragePath string) ([]strin
|
||||
return nil, nil, "ReadMessage: ProcessInboundUserMessage", err
|
||||
}
|
||||
|
||||
fmt.Println("From:", usermsg.From)
|
||||
jsonUserMessage, _ := json.Marshal(usermsg)
|
||||
fmt.Println(string(jsonUserMessage))
|
||||
//fmt.Println("From:", usermsg.From)
|
||||
//jsonUserMessage, _ := json.Marshal(usermsg)
|
||||
//fmt.Println(string(jsonUserMessage))
|
||||
// detach files
|
||||
|
||||
if usermsg.Files != nil {
|
||||
@ -159,7 +157,8 @@ func ReadMessage(messageFilename string, detachFilesStoragePath string) ([]strin
|
||||
//? result["invitation finalized"] = peer.Name
|
||||
}
|
||||
// user message
|
||||
messagesOverview = append(messagesOverview, usermsg.From+" > "+string(usermsg.Data))
|
||||
peer = client.GetConfig().GetIdentity().Peers.GetFromPublicKey(usermsg.From)
|
||||
messagesOverview = append(messagesOverview, peer.Name+" > "+string(usermsg.Data))
|
||||
// add message to storage
|
||||
err = peer.StoreMessage(usermsg, filenames)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user