Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Can I send friend request with a message? #432

Open
FrontMage opened this issue Jul 4, 2020 · 2 comments
Open

[Question] Can I send friend request with a message? #432

FrontMage opened this issue Jul 4, 2020 · 2 comments

Comments

@FrontMage
Copy link

I looked up the documentation, the add_friend accepts only one param which is the public key of the friend, but the C binding lib can add friend with a message, so I wonder if there is a way to achieve this.

I noticed that there is a FriendRequests struct, but it seems never used in the code.

Thanks for the help!

@kurnevsky
Copy link
Member

Currently we have only low level api. add_friend means we add it to friends list only but don't send friend request. Therefore it doesn't contain message parameter.

@FrontMage
Copy link
Author

Currently we have only low level api. add_friend means we add it to friends list only but don't send friend request. Therefore it doesn't contain message parameter.

Thanks for the reply.
I wonder if I can use something like send_lossless to fire a request with a message, I tried to modify the echo.rs example, but it turns out I needed friends to be accepted to use send_lossless.
Then I dived into the code, found out that the dht server maintains all close by node information, but I can't seem to connect to a friend node no matter how. The code clearly says it can punch UDP holes if there are no other relays, I kind got stuck here.

Can you make an example about how to send friend request?
Much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants