openimsdk / openim-docker

openim-docker configuration for deploying OpenIM. Provides a build solution for a stable distribution, as well as a docker compose deployment strategy
https://openim.io
Apache License 2.0
39 stars 48 forks source link

How to set up chat without adding friends? #162

Closed Skx666 closed 1 month ago

Skx666 commented 1 month ago

What would you like to share?

image How do I set the configuration in the config file to make the feature where users cannot send messages without adding friends take effect?

Additional information

No response

kubbot commented 1 month ago

Hello! Thank you for filing an issue.

If this is a bug report, please include relevant logs to help us debug the problem.

Join slack πŸ€– to connect and communicate with our developers.

Skx666 commented 1 month ago

image I just added IMENV_OPENIM_RPC_FRIEND_FRIENDVERIFY=true, saved it, and restarted the service, but it still doesn't work.

Skx666 commented 1 month ago

image After making the changes, the issue persists. Clicking 'Send Message' still allows the message to be sent normally. I want to disable the feature that allows sending messages without adding the person as a friend.

kubbot commented 1 month ago

Bot detected the issue body's language is not English, translate it automatically. πŸ‘―πŸ‘­πŸ»πŸ§‘β€πŸ€β€πŸ§‘πŸ‘«πŸ§‘πŸΏβ€πŸ€β€πŸ§‘πŸ»πŸ‘©πŸΎβ€πŸ€β€πŸ‘¨πŸΏπŸ‘¬πŸΏ


image After I changed it, it still looks like this. Clicking to send a message can still send it normally. I want to cancel the function of sending messages without adding friends.

icey-yu commented 1 month ago

You can add the environment variable settings for openim-server in the docker-compose.yaml file. Add the following content in the environment section: IMENV_OPENIM_RPC_MSG_FRIENDVERIFY=true. Then restart the service.

I'm sorry for my previous incorrect response. The environment variable that should be added is: IMENV_OPENIM_RPC_MSG_FRIENDVERIFY=true