{"id":4561,"date":"2021-11-29T17:48:02","date_gmt":"2021-11-29T09:48:02","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=4561"},"modified":"2022-04-08T19:22:18","modified_gmt":"2022-04-08T11:22:18","slug":"chat","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video-api\/client-api\/react-native-toolkit\/chat\/","title":{"rendered":"Chat: React Native SDK &#8211; Video API"},"content":{"rendered":"\n<p>This is an advance messaging feature between Session participants. You can do following type of messaging in a session among participants:<\/p>\n\n\n\n<ul><li><strong>Public Messaging:&nbsp;<\/strong>To send message to all connected users.<\/li><li><strong>Private Messaging:&nbsp;<\/strong>To send message to a specific user.<\/li><li><strong>Group Messaging:<\/strong>&nbsp;To send message to more than one specified users.<\/li><\/ul>\n\n\n\n<p>Messaging feature neither require the sender to publish his Stream, nor receivers to subscribe.<\/p>\n\n\n\n<p><strong>Method<\/strong>:&nbsp;<code>Enx.sendMessage(message, isBroadcast, clientIds)<\/code><\/p>\n\n\n\n<p><strong>Parameters<\/strong>:<\/p>\n\n\n\n<ul><li><code>message<\/code>&nbsp;\u2013 String.  type message.<\/li><li><code>IsBroadcast<\/code>&nbsp;\u2013 Boolean. Use&nbsp;<em>true&nbsp;<\/em>for Public Broadcast, Use&nbsp;<em>false&nbsp;<\/em>for private messaging to one or more recipients.<\/li><li><code>clientIDs&nbsp;<\/code>\u2013 Array of ClientIDs whom you wish to send private messages.<\/li><\/ul>\n\n\n\n<p><strong>Callback<\/strong>s:&nbsp;<\/p>\n\n\n\n<ul><li><code>receiveChatDataAtRoom<\/code> \u2013 Receives message in JSONObject<\/li><li><code>acknowledgeSendData<\/code> &#8211; Sender is acknowledged<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">Enx.sendMessage(message, true, null); \/\/ Public Messaging\nEnx.sendMessage(message, false, [ClientID]); \/\/ Private\/Group Messaging\n\n \n\/\/ Users Receive Message through Callback \nreceiveChatDataAtRoom: event =&gt; {\n      \/\/ event = \n      \/\/ { \"source_id\":\"XXX\", \"type\":\"chat\", \"msg\":\"hello\"} \n}  \n\n\/\/ Sender is acknowledged  \nacknowledgeSendData: event =&gt; {\n     \n}  \n<\/pre>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\">\n<p>\u2190 <a href=\"..\/send-chat-data\/\"><\/a><a href=\"..\/send-chat-data\/\">Send Chat Data<\/a><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<p class=\"has-text-align-center\"><a href=\"..\/\">Index<\/a><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<p class=\"has-text-align-right\"><a href=\"..\/custom-signalling\/\"><\/a><a href=\"..\/custom-signalling\/\">Custom Signaling<\/a> \u2192<a href=\"\/developer\/how-to-use\/\"><\/a><\/p>\n<\/div>\n<\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is an advance messaging feature between Session participants. You can do following type of messaging in a session among participants: Public Messaging:&nbsp;To send message to all connected users. Private Messaging:&nbsp;To send message to a specific user. Group Messaging:&nbsp;To send message to more than one specified users. Messaging feature neither require the sender to publish his Stream, nor receivers to subscribe. Method:&nbsp;Enx.sendMessage(message, isBroadcast, clientIds) Parameters: message&nbsp;\u2013 String. type message. IsBroadcast&nbsp;\u2013&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3747,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"ub_ctt_via":""},"featured_image_src":null,"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"featured":false,"featured-large":false},"uagb_author_info":{"display_name":"vcxdevwpadmin","author_link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/author\/vcxdevwpadmin\/"},"uagb_comment_info":0,"uagb_excerpt":"This is an advance messaging feature between Session participants. You can do following type of messaging in a session among participants: Public Messaging:&nbsp;To send message to all connected users. Private Messaging:&nbsp;To send message to a specific user. Group Messaging:&nbsp;To send message to more than one specified users. Messaging feature neither require the sender to publish&hellip;","_links":{"self":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4561"}],"collection":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/comments?post=4561"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4561\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/3747"}],"wp:attachment":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/media?parent=4561"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}