UNPKG

@convergence/convergence

Version:
756 lines 57.4 kB
<!doctype html> <html class="default no-js"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>ChatChannel | Convergence JavaScript Client API Documentation</title> <meta name="description" content="Documentation for Convergence JavaScript Client API Documentation"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="../assets/css/main.css"> <link rel="icon" type="image/png" href="https://convergence.io/assets/img/favicon/favicon-16x16.png" sizes="16x16"> <link rel="icon" type="image/png" href="https://convergence.io/assets/img/favicon/favicon-32x32.png" sizes="32x32"> <link rel="icon" type="image/ico" href="https://convergence.io/assets/img/favicon/favicon.ico" sizes="48x48"> <link rel="icon" type="image/png" href="https://convergence.io/assets/img/favicon/favicon-96x96.png" sizes="96x96"> <!-- Start of convergencelabs Zendesk Widget script --> <script id="ze-snippet" src="https://static.zdassets.com/ekr/snippet.js?key=3ee5157d-2fc2-4b08-b6c7-d5fad0533179"> </script> <!-- End of convergencelabs Zendesk Widget script --> </head> <body> <header> <div class="tsd-page-toolbar convergence-header"> <div class="container"> <div class="flex-content"> <a href="../index.html" class="header-brand"> <img src=../assets/images/convergence-logo.png /> <span class="brand-title brand-copy">Convergence JavaScript Client API Documentation</span> <span class="version">1.0.0-rc.12</span> </a> <div class="links brand-copy"> <div class="link"> <a href="https://docs.convergence.io/guide/">Dev Guide</a> </div> <div class="link"> <a href="https://examples.convergence.io">Examples</a> </div> <div class="link"> <a href="https://convergence.io/support/">Support</a> </div> </div> </div> <div class="table-wrap"> <div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base=".."> <div class="field"> <label for="tsd-search-field" class="tsd-widget search no-caption">Search</label> <input id="tsd-search-field" type="text" /> </div> <ul class="results"> <li class="state loading">Preparing search index...</li> <li class="state failure">The search index is not available</li> </ul> </div> <div class="table-cell" id="tsd-widgets"> <div id="tsd-filter"> <a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a> <div class="tsd-filter-group"> <input type="checkbox" id="tsd-filter-inherited" checked /> <label class="tsd-widget" for="tsd-filter-inherited">Inherited</label> </div> </div> <a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a> </div> </div> </div> </div> <div class="tsd-page-title"> <div class="container"> <ul class="tsd-breadcrumb"> <li> <a href="../globals.html">Index</a> </li> <li> <a href="../modules/chat.html">Chat</a> </li> <li> <a href="chat.chatchannel.html">ChatChannel</a> </li> </ul> <h1>Class ChatChannel</h1> </div> </div> </header> <div class="container container-main"> <div class="row"> <div class="col-8 col-content"> <section class="tsd-panel tsd-comment"> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>A <a href="chat.chatchannel.html">ChatChannel</a> is a Chat construct that has persistent membership of users whether they are currently connected or not.</p> </div> </div> </section> <section class="tsd-panel tsd-hierarchy"> <h3>Hierarchy</h3> <ul class="tsd-hierarchy"> <li> <a href="chat.membershipchat.html" class="tsd-signature-type">MembershipChat</a> <ul class="tsd-hierarchy"> <li> <span class="target">ChatChannel</span> </li> </ul> </li> </ul> </section> <section class="tsd-panel-group tsd-index-group"> <h2>Index</h2> <section class="tsd-panel tsd-index-panel"> <div class="tsd-index-content"> <section class="tsd-index-section tsd-is-inherited"> <h3>Properties</h3> <ul class="tsd-index-list"> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static"><a href="chat.chatchannel.html#events" class="tsd-kind-icon">Events</a></li> </ul> </section> <section class="tsd-index-section "> <h3>Methods</h3> <ul class="tsd-index-list"> <li class="tsd-kind-method tsd-parent-kind-class"><a href="chat.chatchannel.html#add" class="tsd-kind-icon">add</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="chat.chatchannel.html#addlistener" class="tsd-kind-icon">add<wbr>Listener</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="chat.chatchannel.html#events-1" class="tsd-kind-icon">events</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="chat.chatchannel.html#gethistory" class="tsd-kind-icon">get<wbr>History</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-inherited"><a href="chat.chatchannel.html#info" class="tsd-kind-icon">info</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="chat.chatchannel.html#isjoined" class="tsd-kind-icon">is<wbr>Joined</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="chat.chatchannel.html#leave" class="tsd-kind-icon">leave</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="chat.chatchannel.html#markseen" class="tsd-kind-icon">mark<wbr>Seen</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="chat.chatchannel.html#off" class="tsd-kind-icon">off</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="chat.chatchannel.html#on" class="tsd-kind-icon">on</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="chat.chatchannel.html#once" class="tsd-kind-icon">once</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="chat.chatchannel.html#permissions" class="tsd-kind-icon">permissions</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="chat.chatchannel.html#remove" class="tsd-kind-icon">remove</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="chat.chatchannel.html#removealllisteners" class="tsd-kind-icon">remove<wbr>All<wbr>Listeners</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="chat.chatchannel.html#removelistener" class="tsd-kind-icon">remove<wbr>Listener</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="chat.chatchannel.html#removelisteners" class="tsd-kind-icon">remove<wbr>Listeners</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="chat.chatchannel.html#send" class="tsd-kind-icon">send</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="chat.chatchannel.html#session" class="tsd-kind-icon">session</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="chat.chatchannel.html#setname" class="tsd-kind-icon">set<wbr>Name</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="chat.chatchannel.html#settopic" class="tsd-kind-icon">set<wbr>Topic</a></li> </ul> </section> </div> </section> </section> <section class="tsd-panel-group tsd-member-group tsd-is-inherited"> <h2>Properties</h2> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static"> <a name="events" class="tsd-anchor"></a> <h3>Events</h3> <div class="tsd-signature tsd-kind-icon">Events<span class="tsd-signature-symbol">:</span> <a href="../interfaces/chat.chatevents.html" class="tsd-signature-type">ChatEvents</a><span class="tsd-signature-symbol"> = Events</span></div> <aside class="tsd-sources"> <p>Inherited from <a href="chat.membershipchat.html">MembershipChat</a>.<a href="chat.membershipchat.html#events">Events</a></p> </aside> </section> </section> <section class="tsd-panel-group tsd-member-group "> <h2>Methods</h2> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"> <a name="add" class="tsd-anchor"></a> <h3>add</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">add<span class="tsd-signature-symbol">(</span>user<span class="tsd-signature-symbol">: </span><a href="../modules/users_and_identity.html#domainuseridentifier" class="tsd-signature-type">DomainUserIdentifier</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Adds a new user to this ChatChannel.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>user: <a href="../modules/users_and_identity.html#domainuseridentifier" class="tsd-signature-type">DomainUserIdentifier</a></h5> <div class="tsd-comment tsd-typography"> <p> The user to add to this ChatChannel.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4> <p> A promise that is resolved when the user has successfully be added.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="addlistener" class="tsd-anchor"></a> <h3>add<wbr>Listener</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">add<wbr>Listener<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, listener<span class="tsd-signature-symbol">: </span><a href="../globals.html#convergenceeventlistener" class="tsd-signature-type">ConvergenceEventListener</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/chat.ichatevent.html" class="tsd-signature-type">IChatEvent</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="convergenceeventemitter.html" class="tsd-signature-type">ConvergenceEventEmitter</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/chat.ichatevent.html" class="tsd-signature-type">IChatEvent</a><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="convergenceeventemitter.html">ConvergenceEventEmitter</a>.<a href="convergenceeventemitter.html#addlistener">addListener</a></p> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Adds a new event listener for the specified event. The class will ignore duplicate registrations of the same listener to the same event.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>event: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p> The name of the event to add the listener for.</p> </div> </li> <li> <h5>listener: <a href="../globals.html#convergenceeventlistener" class="tsd-signature-type">ConvergenceEventListener</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/chat.ichatevent.html" class="tsd-signature-type">IChatEvent</a><span class="tsd-signature-symbol">&gt;</span></h5> <div class="tsd-comment tsd-typography"> <p> The listener callback to register.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="convergenceeventemitter.html" class="tsd-signature-type">ConvergenceEventEmitter</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/chat.ichatevent.html" class="tsd-signature-type">IChatEvent</a><span class="tsd-signature-symbol">&gt;</span></h4> <p> This object, in support of a fluent API.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="events-1" class="tsd-anchor"></a> <h3>events</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">events<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Observable</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/chat.ichatevent.html" class="tsd-signature-type">IChatEvent</a><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="convergenceeventemitter.html">ConvergenceEventEmitter</a>.<a href="convergenceeventemitter.html#events">events</a></p> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Provides the events emitted by this object as an Observable stream.</p> </div> <dl class="tsd-comment-tags"> <dt>example</dt> <dd><pre><code class="language-typescript"> eventEmitter.events() .filter(<span class="hljs-function"><span class="hljs-params">e</span> =&gt;</span> e.name === <span class="hljs-string">&quot;myevent&quot;</span>) .subscribe(<span class="hljs-function"><span class="hljs-params">e</span> =&gt;</span> <span class="hljs-built_in">console</span>.log(e)); </code></pre> </dd> </dl> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Observable</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/chat.ichatevent.html" class="tsd-signature-type">IChatEvent</a><span class="tsd-signature-symbol">&gt;</span></h4> <p> An Observable stream of all events emitted by this object.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="gethistory" class="tsd-anchor"></a> <h3>get<wbr>History</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">get<wbr>History<span class="tsd-signature-symbol">(</span>options<span class="tsd-signature-symbol">?: </span><a href="../interfaces/chat.ichathistorysearchoptions.html" class="tsd-signature-type">IChatHistorySearchOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="pageddata.html" class="tsd-signature-type">PagedData</a><span class="tsd-signature-symbol">&lt;</span><a href="chat.chathistoryentry.html" class="tsd-signature-type">ChatHistoryEntry</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="chat.membershipchat.html">MembershipChat</a>.<a href="chat.membershipchat.html#gethistory">getHistory</a></p> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Get the history of events for this <a href="chat.chat-1.html">Chat</a>. Events consist of messages, users joining / leaving, and a variety of other events depending on the chat type.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>options: <a href="../interfaces/chat.ichathistorysearchoptions.html" class="tsd-signature-type">IChatHistorySearchOptions</a></h5> <div class="tsd-comment tsd-typography"> <p> Options that define the events the user would like to fetch.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="pageddata.html" class="tsd-signature-type">PagedData</a><span class="tsd-signature-symbol">&lt;</span><a href="chat.chathistoryentry.html" class="tsd-signature-type">ChatHistoryEntry</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span></h4> <p> A promise that will be resolved with an array of Chat events that match the specified search options.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-inherited"> <a name="info" class="tsd-anchor"></a> <h3>info</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">info<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/chat.membershipchatinfo.html" class="tsd-signature-type">MembershipChatInfo</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="chat.membershipchat.html">MembershipChat</a>.<a href="chat.membershipchat.html#info">info</a></p> <p>Overrides <a href="chat.chat-1.html">Chat</a>.<a href="chat.chat-1.html#info">info</a></p> </aside> <h4 class="tsd-returns-title">Returns <a href="../interfaces/chat.membershipchatinfo.html" class="tsd-signature-type">MembershipChatInfo</a></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="isjoined" class="tsd-anchor"></a> <h3>is<wbr>Joined</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">is<wbr>Joined<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="chat.membershipchat.html">MembershipChat</a>.<a href="chat.membershipchat.html#isjoined">isJoined</a></p> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Determines if the Chat is Joined. Chat&#39;s must be joined to perform many functions, such as sending messages.</p> </div> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4> <p> True if the chat is joined, false otherwise.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="leave" class="tsd-anchor"></a> <h3>leave</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">leave<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="chat.membershipchat.html">MembershipChat</a>.<a href="chat.membershipchat.html#leave">leave</a></p> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Leaves the chat, such that messages will no longer be received. The semantics of this depend on the specific subclass.</p> </div> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4> <p> A promise that will be resolved when the Chat is left successfully.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="markseen" class="tsd-anchor"></a> <h3>mark<wbr>Seen</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">mark<wbr>Seen<span class="tsd-signature-symbol">(</span>eventNumber<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="chat.membershipchat.html">MembershipChat</a>.<a href="chat.membershipchat.html#markseen">markSeen</a></p> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Marks the specified event number as having been seen by the local user. It is assumed that all events prior or equal to this event have been seen by the user.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>eventNumber: <span class="tsd-signature-type">number</span></h5> <div class="tsd-comment tsd-typography"> <p> The event number to mark as set.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4> <p> A promise acknowledging that seen events have been marked successfully.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="off" class="tsd-anchor"></a> <h3>off</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">off<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, listener<span class="tsd-signature-symbol">: </span><a href="../globals.html#convergenceeventlistener" class="tsd-signature-type">ConvergenceEventListener</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/chat.ichatevent.html" class="tsd-signature-type">IChatEvent</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="convergenceeventemitter.html" class="tsd-signature-type">ConvergenceEventEmitter</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/chat.ichatevent.html" class="tsd-signature-type">IChatEvent</a><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="convergenceeventemitter.html">ConvergenceEventEmitter</a>.<a href="convergenceeventemitter.html#off">off</a></p> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Removes a single event listener for a specific event.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>event: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p> The name of the event to remove the listener for.</p> </div> </li> <li> <h5>listener: <a href="../globals.html#convergenceeventlistener" class="tsd-signature-type">ConvergenceEventListener</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/chat.ichatevent.html" class="tsd-signature-type">IChatEvent</a><span class="tsd-signature-symbol">&gt;</span></h5> <div class="tsd-comment tsd-typography"> <p> The listener callback to unregister.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="convergenceeventemitter.html" class="tsd-signature-type">ConvergenceEventEmitter</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/chat.ichatevent.html" class="tsd-signature-type">IChatEvent</a><span class="tsd-signature-symbol">&gt;</span></h4> <p> This object, in support of a fluent API.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="on" class="tsd-anchor"></a> <h3>on</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">on<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, listener<span class="tsd-signature-symbol">: </span><a href="../globals.html#convergenceeventlistener" class="tsd-signature-type">ConvergenceEventListener</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/chat.ichatevent.html" class="tsd-signature-type">IChatEvent</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="convergenceeventemitter.html" class="tsd-signature-type">ConvergenceEventEmitter</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/chat.ichatevent.html" class="tsd-signature-type">IChatEvent</a><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="convergenceeventemitter.html">ConvergenceEventEmitter</a>.<a href="convergenceeventemitter.html#on">on</a></p> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Adds a new event listener for the specified event. The class will ignore duplicate registrations of the same listener to the same event.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>event: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p> The name of the event to add the listener for.</p> </div> </li> <li> <h5>listener: <a href="../globals.html#convergenceeventlistener" class="tsd-signature-type">ConvergenceEventListener</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/chat.ichatevent.html" class="tsd-signature-type">IChatEvent</a><span class="tsd-signature-symbol">&gt;</span></h5> <div class="tsd-comment tsd-typography"> <p> The listener callback to register.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="convergenceeventemitter.html" class="tsd-signature-type">ConvergenceEventEmitter</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/chat.ichatevent.html" class="tsd-signature-type">IChatEvent</a><span class="tsd-signature-symbol">&gt;</span></h4> <p> This object, in support of a fluent API.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="once" class="tsd-anchor"></a> <h3>once</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">once<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, listener<span class="tsd-signature-symbol">: </span><a href="../globals.html#convergenceeventlistener" class="tsd-signature-type">ConvergenceEventListener</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/chat.ichatevent.html" class="tsd-signature-type">IChatEvent</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="convergenceeventemitter.html" class="tsd-signature-type">ConvergenceEventEmitter</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/chat.ichatevent.html" class="tsd-signature-type">IChatEvent</a><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="convergenceeventemitter.html">ConvergenceEventEmitter</a>.<a href="convergenceeventemitter.html#once">once</a></p> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Adds a single shot event listener for the specified event. The listener will be called the first time the specified event is fired after the event registration occurs, after which the registration will be removed and no further events will be passed to the listener.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>event: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p> The name of the event to add the listener for.</p> </div> </li> <li> <h5>listener: <a href="../globals.html#convergenceeventlistener" class="tsd-signature-type">ConvergenceEventListener</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/chat.ichatevent.html" class="tsd-signature-type">IChatEvent</a><span class="tsd-signature-symbol">&gt;</span></h5> <div class="tsd-comment tsd-typography"> <p> The listener callback to register.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="convergenceeventemitter.html" class="tsd-signature-type">ConvergenceEventEmitter</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/chat.ichatevent.html" class="tsd-signature-type">IChatEvent</a><span class="tsd-signature-symbol">&gt;</span></h4> <p> This object, in support of a fluent API.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="permissions" class="tsd-anchor"></a> <h3>permissions</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">permissions<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="chat.chatpermissionmanager.html" class="tsd-signature-type">ChatPermissionManager</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="chat.membershipchat.html">MembershipChat</a>.<a href="chat.membershipchat.html#permissions">permissions</a></p> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Returns the permissions manager for this chat.</p> </div> </div> <h4 class="tsd-returns-title">Returns <a href="chat.chatpermissionmanager.html" class="tsd-signature-type">ChatPermissionManager</a></h4> <p>the permissions manager for this chat.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="remove" class="tsd-anchor"></a> <h3>remove</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">remove<span class="tsd-signature-symbol">(</span>user<span class="tsd-signature-symbol">: </span><a href="../modules/users_and_identity.html#domainuseridentifier" class="tsd-signature-type">DomainUserIdentifier</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="chat.membershipchat.html">MembershipChat</a>.<a href="chat.membershipchat.html#remove">remove</a></p> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Removes the specified user from the Chat.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>user: <a href="../modules/users_and_identity.html#domainuseridentifier" class="tsd-signature-type">DomainUserIdentifier</a></h5> <div class="tsd-comment tsd-typography"> <p> The user to remove from the Chat.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4> <p> A promise that is resolved when the specified user is successfully removed from the chat.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="removealllisteners" class="tsd-anchor"></a> <h3>remove<wbr>All<wbr>Listeners</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">remove<wbr>All<wbr>Listeners<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="convergenceeventemitter.html" class="tsd-signature-type">ConvergenceEventEmitter</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/chat.ichatevent.html" class="tsd-signature-type">IChatEvent</a><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="convergenceeventemitter.html">ConvergenceEventEmitter</a>.<a href="convergenceeventemitter.html#removealllisteners">removeAllListeners</a></p> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Removes all listeners for all events. This is useful for cleanup before disposing of this particular event emitter.</p> </div> </div> <h4 class="tsd-returns-title">Returns <a href="convergenceeventemitter.html" class="tsd-signature-type">ConvergenceEventEmitter</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/chat.ichatevent.html" class="tsd-signature-type">IChatEvent</a><span class="tsd-signature-symbol">&gt;</span></h4> <p> This object, in support of a fluent API.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="removelistener" class="tsd-anchor"></a> <h3>remove<wbr>Listener</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">remove<wbr>Listener<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, listener<span class="tsd-signature-symbol">: </span><a href="../globals.html#convergenceeventlistener" class="tsd-signature-type">ConvergenceEventListener</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/chat.ichatevent.html" class="tsd-signature-type">IChatEvent</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="convergenceeventemitter.html" class="tsd-signature-type">ConvergenceEventEmitter</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/chat.ichatevent.html" class="tsd-signature-type">IChatEvent</a><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="convergenceeventemitter.html">ConvergenceEventEmitter</a>.<a href="convergenceeventemitter.html#removelistener">removeListener</a></p> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Removes a single event listener for a specific event.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>event: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p> The name of the event to remove the listener for.</p> </div> </li> <li> <h5>listener: <a href="../globals.html#convergenceeventlistener" class="tsd-signature-type">ConvergenceEventListener</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/chat.ichatevent.html" class="tsd-signature-type">IChatEvent</a><span class="tsd-signature-symbol">&gt;</span></h5> <div class="tsd-comment tsd-typography"> <p> The listener callback to unregister.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="convergenceeventemitter.html" class="tsd-signature-type">ConvergenceEventEmitter</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/chat.ichatevent.html" class="tsd-signature-type">IChatEvent</a><span class="tsd-signature-symbol">&gt;</span></h4> <p> This object, in support of a fluent API.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="removelisteners" class="tsd-anchor"></a> <h3>remove<wbr>Listeners</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">remove<wbr>Listeners<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="convergenceeventemitter.html" class="tsd-signature-type">ConvergenceEventEmitter</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/chat.ichatevent.html" class="tsd-signature-type">IChatEvent</a><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="convergenceeventemitter.html">ConvergenceEventEmitter</a>.<a href="convergenceeventemitter.html#removelisteners">removeListeners</a></p> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Removes all listeners bound on the given event.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>event: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>the name of the event to remove listeners for</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="convergenceeventemitter.html" class="tsd-signature-type">ConvergenceEventEmitter</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/chat.ichatevent.html" class="tsd-signature-type">IChatEvent</a><span class="tsd-signature-symbol">&gt;</span></h4> <p> This object, in support of a fluent API.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="send" class="tsd-anchor"></a> <h3>send</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">send<span class="tsd-signature-symbol">(</span>message<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/chat.ichatmessageresponse.html" class="tsd-signature-type">IChatMessageResponse</a><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="chat.membershipchat.html">MembershipChat</a>.<a href="chat.membershipchat.html#send">send</a></p> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Publishes a chat message to this Chat.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>message: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p> The message to send.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/chat.ichatmessageresponse.html" class="tsd-signature-type">IChatMessageResponse</a><span class="tsd-signature-symbol">&gt;</span></h4> <p> A promise acknowledging that the message has been received by the server.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="session" class="tsd-anchor"></a> <h3>session</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">session<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="users_and_identity.convergencesession.html" class="tsd-signature-type">ConvergenceSession</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="chat.membershipchat.html">MembershipChat</a>.<a href="chat.membershipchat.html#session">session</a></p> </aside> <div class="tsd-comment tsd-typography"> </div> <h4 class="tsd-returns-title">Returns <a href="users_and_identity.convergencesession.html" class="tsd-signature-type">ConvergenceSession</a></h4> <p> The <a href="users_and_identity.convergencesession.html">ConvergenceSession</a> this <a href="chat.chat-1.html">Chat</a> is associated with.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="setname" class="tsd-anchor"></a> <h3>set<wbr>Name</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">set<wbr>Name<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="chat.membershipchat.html">MembershipChat</a>.<a href="chat.membershipchat.html#setname">setName</a></p> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Sets the short descriptive name for this chat.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>name: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p> The name to set.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4> <p> A promise acknowledging that the name has been successfully set.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="settopic" class="tsd-anchor"></a> <h3>set<wbr>Topic</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">set<wbr>Topic<span class="tsd-signature-symbol">(</span>topic<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="chat.membershipchat.html">MembershipChat</a>.<a href="chat.membershipchat.html#settopic">setTopic</a></p> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Sets the the current topic being discussed in the chat.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>topic: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p> The topic to set.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4> <p> A promise acknowledging that the topic has been successfully set.</p> </li> </ul> </section> </section> </div> <div class="col-4 col-menu menu-sticky-wrap menu-highlight"> <nav class="tsd-navigation primary"> <ul> <li class="globals "> <a href="../globals.html"><em>Index</em></a> </li> <li class="modules-label">Modules</li> <li class=" tsd-kind-module"> <span class="tsd-kind-icon"><a href="../modules/activities.html">Activities</a></span> </li> <li class="current tsd-kind-module"> <span class="tsd-kind-icon"><a href="../modules/chat.html">Chat</a></span> </li> <li class=" tsd-kind-module"> <span class="tsd-kind-icon"><a href="../modules/connection_and_authentication.html">Connection and <wbr>Authentication</a></span> </li> <li cla