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

Invite Member Feature #1494

Closed
cleandevcode opened this issue Jun 17, 2022 · 4 comments
Closed

Invite Member Feature #1494

cleandevcode opened this issue Jun 17, 2022 · 4 comments

Comments

@cleandevcode
Copy link

cleandevcode commented Jun 17, 2022

Hello, there.

I am gonna implement invite member feature using this SDK.
The ideal workflow I want is Skype.
So there are 2 users - user 1 and user 2.

  • User 1 requests an invitation with some message to user 2. (He will send some messages continuously even User 2 does not accept yet)
  • User 2 can accept or deny User 1`s request.
  • Once User 2 accepts User 1`s request, then the previous invitation message will be the first chat history with him.

I checked this guide - https://getstream.io/chat/docs/react/channel_invites/

Is it possible to implement like above only on client-side?

Thanks.

@madsroskar
Copy link
Contributor

I'm not entirely sure I understand what you're trying to achieve. Am i understanding correctly that you'd want for user 1 to be able to send messages to the channel, but when user 2 accepts the invite, only the invitation message is displayed - effectively removing all messages user 1 sent before user 2 accepted the invite?

@cleandevcode
Copy link
Author

InviteMember feature seems works to invite the other guys to the specific channel.
But the feature I wanna implement is that make a message request before chatting only 1:1.

So I am curious if I can implement this feature without back-end..

@vanGalilea
Copy link
Contributor

@khushal87
Copy link
Member

khushal87 commented May 22, 2024

Hey @cleandevcode, I think to achieve this, you can utilize the custom property in the channel and store a boolean while sending initial messages to the channel. You can use channel.updatePartial to do the same and update the property with the invited state, and depending on the state, you would get the same data for the channel for the other user and thereby allow messaging only if the invite is accepted. You can also show the UI of invite, accept, or reject depending on the state. The channel.updated can be listened to for the same. You can utilize channel filters to filter out channel for the same. This seems to be a custom use case, and I don't think this is something an SDK should provide, but it can be built on top of the custom properties in the channel. So, I will be closing this issue. Thanks 😄

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

No branches or pull requests

4 participants