Even more simple echobot
This commit is contained in:
parent
ed98f059f1
commit
223842a32b
|
@ -49,7 +49,6 @@ func main() {
|
||||||
cid, _ := cwtchbot.Peer.FetchConversationInfo(message.Data[event.RemotePeer])
|
cid, _ := cwtchbot.Peer.FetchConversationInfo(message.Data[event.RemotePeer])
|
||||||
switch message.EventType {
|
switch message.EventType {
|
||||||
case event.NewMessageFromPeer:
|
case event.NewMessageFromPeer:
|
||||||
cwtchbot.Queue.Publish(event.NewEvent(event.PeerAcknowledgement, map[event.Field]string{event.EventID: message.EventID, event.RemotePeer: message.Data[event.RemotePeer]}))
|
|
||||||
msg := cwtchbot.UnpackMessage(message.Data[event.Data])
|
msg := cwtchbot.UnpackMessage(message.Data[event.Data])
|
||||||
fmt.Printf("Message: %v\n", msg)
|
fmt.Printf("Message: %v\n", msg)
|
||||||
reply := string(cwtchbot.PackMessage(msg.Overlay, msg.Data))
|
reply := string(cwtchbot.PackMessage(msg.Overlay, msg.Data))
|
||||||
|
|
Loading…
Reference in New Issue