27 lines
1.6 KiB
Plaintext
27 lines
1.6 KiB
Plaintext
might need to receive, but mostly focusing on sending 1:1
|
|
* receiving requires a handler
|
|
one topic for 1:1 if you don't need to receive
|
|
might need mapping of emails or user ids to status keys (status key is the public key, right?)
|
|
status-go is maintained by status-im, and used by two internal teams.
|
|
* it's a bit bloated, but it has the right API
|
|
community is a different type of chat context, like moderated channels/topics
|
|
* this is to solve the problem of spam and garbage in public chats
|
|
* implementing this would be a significant lift
|
|
* we don't need a whisper/waku bridge. whisper is basically dead.
|
|
|
|
status-go node:
|
|
/Users/kevin/projects/github/status-go/protocol/messenger.go is central handler of all protobuf types
|
|
can build a binary and it'll have a json RPC server built in. it'll support 1:1 and public messages
|
|
will also handle storage of messages
|
|
following instructions at https://status.im/technical/build_status/status_go.html and fire up build/bin/statusd, which defaults to fleet eth.prod (the default fleet for the status app)
|
|
|
|
api method:
|
|
|
|
func (api *PublicAPI) SendChatMessage(ctx context.Context, message *common.Message) (*protocol.MessengerResponse, error) {
|
|
return api.service.messenger.SendChatMessage(ctx, message)
|
|
}
|
|
|
|
a common.Message has a chat type. handlers use this to figure out how to handle decryption and how to calculate the partition topic.
|
|
|
|
dispatch messagse is where things are sent and handles the raw message (https://github.com/status-im/status-go/blob/938e7987ca4f7d4e5fadcd7f32306bfc3e1f6736/protocol/messenger.go#L1747-L1746)
|