mirror of
https://github.com/status-im/status-go.git
synced 2025-01-09 22:26:30 +00:00
2a4382369a
This PR does a few things: 1) Add a call GetContactCode to check whether we have a bundle for a given user. 2) Add a DH flag to the API (non-breaking change), for those messages that we want to target all devices (contact-requests for example). 3) Fixes a few small issues with installations, namely if for example a messages is sent without a bundle (currently not done by any client), we still infer installation info, so that we can communicate securely and making it truly optional.
25 lines
716 B
Go
25 lines
716 B
Go
// TODO: These types should be defined using protobuf, but protoc can only emit []byte instead of hexutil.Bytes,
|
|
// which causes issues when marshalong to JSON on the react side. Let's do that once the chat protocol is moved to the go repo.
|
|
|
|
package chat
|
|
|
|
import (
|
|
"github.com/ethereum/go-ethereum/common/hexutil"
|
|
)
|
|
|
|
// SendPublicMessageRPC represents the RPC payload for the SendPublicMessage RPC method
|
|
type SendPublicMessageRPC struct {
|
|
Sig string
|
|
Chat string
|
|
Payload hexutil.Bytes
|
|
}
|
|
|
|
// SendDirectMessageRPC represents the RPC payload for the SendDirectMessage RPC method
|
|
type SendDirectMessageRPC struct {
|
|
Sig string
|
|
Chat string
|
|
Payload hexutil.Bytes
|
|
PubKey hexutil.Bytes
|
|
DH bool
|
|
}
|