forked from cwtch.im/cwtch
Disable Automatic Peer Invites for Now
This commit is contained in:
parent
183bdea809
commit
361d7befd1
|
@ -469,7 +469,8 @@ func (e *engine) sendMessageToGroup(server string, ct []byte, sig []byte) error
|
||||||
func (e *engine) handlePeerMessage(hostname string, eventID string, context string, message []byte) {
|
func (e *engine) handlePeerMessage(hostname string, eventID string, context string, message []byte) {
|
||||||
log.Debugf("New message from peer: %v %v", hostname, context)
|
log.Debugf("New message from peer: %v %v", hostname, context)
|
||||||
if context == event.ContextInvite {
|
if context == event.ContextInvite {
|
||||||
e.eventManager.Publish(event.NewEvent(event.NewGroupInvite, map[event.Field]string{event.TimestampReceived: time.Now().Format(time.RFC3339Nano), event.RemotePeer: hostname, event.GroupInvite: string(message)}))
|
// TODO: Convert this to an inline peer message...
|
||||||
|
// e.eventManager.Publish(event.NewEvent(event.NewGroupInvite, map[event.Field]string{event.TimestampReceived: time.Now().Format(time.RFC3339Nano), event.RemotePeer: hostname, event.GroupInvite: string(message)}))
|
||||||
} else if context == event.ContextGetVal {
|
} else if context == event.ContextGetVal {
|
||||||
var getVal peerGetVal
|
var getVal peerGetVal
|
||||||
err := json.Unmarshal(message, &getVal)
|
err := json.Unmarshal(message, &getVal)
|
||||||
|
|
Loading…
Reference in New Issue