testing new message id id-ea
the build failed Details

This commit is contained in:
erinn 2020-10-15 22:39:57 -07:00
parent a2c5a28e09
commit 1933fb703f
2 changed files with 6 additions and 3 deletions

View File

@ -418,12 +418,15 @@ func (cp *cwtchPeer) SendMessageToGroupTracked(groupid string, message string) (
func (cp *cwtchPeer) SendMessageToPeer(onion string, message string) string {
event := event.NewEvent(event.SendMessageToPeer, map[event.Field]string{event.RemotePeer: onion, event.Data: message})
cp.eventBus.Publish(event)
cp.mutex.Lock()
contact, _ := cp.Profile.GetContact(onion)
event.EventID = strconv.Itoa(contact.Timeline.Len())
cp.Profile.AddSentMessageToContactTimeline(onion, message, time.Now(), event.EventID)
cp.mutex.Unlock()
cp.eventBus.Publish(event)
return event.EventID
}

View File

@ -40,7 +40,7 @@ func main() {
serverConfig := cwtchserver.LoadConfig(configDir, serverConfigFile)
acn, err := tor.NewTorACNWithAuth(".", "", 9051, tor.HashedPasswordAuthenticator{Password: "examplehashedpassword"})
acn, err := tor.NewTorACNWithAuth(".", "./tor/tor", 9010, tor.NullAuthenticator{})
if err != nil {
log.Errorf("\nError connecting to Tor: %v\n", err)
os.Exit(1)
@ -61,7 +61,7 @@ func main() {
if err != nil {
panic(err)
}
fmt.Printf("%v", "torv3"+base64.StdEncoding.EncodeToString(invite))
fmt.Printf("%v\n", "torv3"+base64.StdEncoding.EncodeToString(invite))
bundle := server.KeyBundle().Serialize()
log.Infof("Server Config: server:%s", base64.StdEncoding.EncodeToString(bundle))