start through server invitation process
This commit is contained in:
@ -100,6 +100,24 @@ func (ints *InternalServer) BuildMessageRequestMessage(lookupKeys []string) ([]b
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// Creates a basic message to server from a single packed user message and returns it as protobuf serialized byte array
|
||||
func (ints *InternalServer) BuildToServerMessageInvitation(invitation *meowlib.ContactCard, password string, timeout int, urllen int) (*meowlib.ToServerMessage, error) {
|
||||
var msg meowlib.ToServerMessage
|
||||
var inv meowlib.Invitation
|
||||
payload, err := invitation.Compress()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
msg.Type = "1"
|
||||
msg.From = ints.Me.Public
|
||||
inv.Password = password
|
||||
inv.Timeout = int32(timeout)
|
||||
inv.Urllen = int32(urllen)
|
||||
inv.Payload = payload
|
||||
msg.Invitation = &inv
|
||||
return &msg, nil
|
||||
}
|
||||
|
||||
func (ints *InternalServer) PackServerMessage(payload []byte, signature []byte) (protoPackedMessage []byte, err error) {
|
||||
var msg meowlib.PackedServerMessage
|
||||
msg.From = ints.Me.Public
|
||||
|
Reference in New Issue
Block a user