Official cwtch.im peer and server implementations.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

cwtch_peer_server_intergration_test.go 577B

123456789101112131415161718192021
  1. package peer
  2. import (
  3. "testing"
  4. "time"
  5. )
  6. func TestCwtchPeerIntegration(t *testing.T) {
  7. alice := NewCwtchPeer("Alice")
  8. id, _ := alice.Profile.StartGroup("ylhbhtypevo4ympq")
  9. alice.Profile.AddContact(alice.Profile.Onion, alice.Profile.PublicProfile)
  10. alice.JoinServer("ylhbhtypevo4ympq")
  11. // time.Sleep(time.Second *5)
  12. alice.SendMessageToGroup(id, "Hello")
  13. alice.SendMessageToGroup(id, "My")
  14. alice.SendMessageToGroup(id, "Name Is")
  15. alice.SendMessageToGroup(id, "ALICE!!!")
  16. time.Sleep(time.Second * 5)
  17. group := alice.Profile.Groups[id]
  18. t.Logf("%v", group.Timeline)
  19. }