RTC Forums

Subscription => Support => Topic started by: byte on September 20, 2016, 10:25:37 AM



Title: Send data to user group
Post by: byte on September 20, 2016, 10:25:37 AM
I need to send data using sendbytes method to all users in the group but group is not created by me!
Is there any way to do this with one sendbytes method call?


Title: Re: Send data to user group
Post by: D.Tkalcec (RTC) on September 20, 2016, 10:29:01 AM
Gate Client can ONLY send data to Groups created and managed by that Gate Client. Any Client that needs to send data to a Group has to create that Group and add all users to its Group. Also, for any Client to be allowed to add any other Client to his Group, the Client creating the Group has to send a direct message to all the Clients he wants to add, wait for each of these Clients to add the Client as a Friend, only then can the Client add another Client to his Group.

Best Regards,
Danijel Tkalcec


Title: Re: Send data to user group
Post by: byte on September 20, 2016, 10:34:23 AM
well...
Is there any method to get all connected user id numbers from client?


Title: Re: Send data to user group
Post by: D.Tkalcec (RTC) on September 20, 2016, 10:37:48 AM
The information about IDs of all logged in Clients is confidential. Would the Gateway provide a method to any Client to get a list of all other Clients, it would become vulnerable to all sorts of attacks.

The only alternative to manually creating Groups by Clients is to use the "AddUserToGroup" or "AddUserToChannel" methods on the Gateway for any Clients which the Gateway "knows" to be trustworthy and wants to automatically allow them to send data to one or more other connected Clients, without requesting special permissions and manually creating Groups. Check the Gate Chat example to see how that can be done.

P.S. Imagine a scenarion where the Gateway is accessible over the Internet and has to serve hundreds or even thousands of Clients, all exchanging data. Then, a malicious person decides to start a few Clients, connect them to the Gateway, request a complete list of all the other connected Clients, add all those Clients to his Group without asking for any permissions and then starts sending data to all of them through the Gateway. When those malicious Clients start sending data through the Gateway to all other Clients, the Gateway would become unusable for any normal data exchange. Would the Gateway allow this, it would become the prfect target for hackers.

Best Regards,
Danijel Tkalcec


Title: Re: Send data to user group
Post by: byte on September 20, 2016, 12:14:21 PM
Yes you are right.
I've solved over group creator user via custom message.
Thank you.