@@ -140,29 +140,29 @@ export default class Client extends (EventEmitter as { new(): ClientEmitter }) {
140140 * Indicate that the user is currently present in the conversation.
141141 * Only relevant for non-group conversations
142142 */
143- sendPresenceState = async ( recipientUserId : string , present : boolean ) => {
143+ async sendPresenceState ( recipientUserId : string , present : boolean ) {
144144 const payload = new Payloads . PresenceState ( recipientUserId , present )
145- this . mqttApi . sendPublish ( payload . getTopic ( ) , await Payloads . encodePayload ( payload ) )
145+ return this . mqttApi . sendPublish ( payload . getTopic ( ) , await Payloads . encodePayload ( payload ) )
146146 }
147147
148148 /**
149149 * Send "User is typing" message.
150150 * In a non-group conversation, sendPresenceState() must be called first.
151151 */
152- sendTypingState = async ( threadOrRecipientUserId : string , present : boolean ) => {
152+ async sendTypingState ( threadOrRecipientUserId : string , present : boolean ) {
153153 const payload = new Payloads . TypingState ( this . session . tokens . uid , present , threadOrRecipientUserId )
154- this . mqttApi . sendPublish ( payload . getTopic ( ) , await Payloads . encodePayload ( payload ) )
154+ return this . mqttApi . sendPublish ( payload . getTopic ( ) , await Payloads . encodePayload ( payload ) )
155155 }
156156
157157 /**
158158 * Mark a message as read.
159159 */
160- sendReadReceipt = async ( message : Message ) => {
160+ async sendReadReceipt ( message : Message ) {
161161 const payload = new Payloads . ReadReceipt ( message )
162- this . mqttApi . sendPublish ( payload . getTopic ( ) , await Payloads . encodePayload ( payload ) )
162+ return this . mqttApi . sendPublish ( payload . getTopic ( ) , await Payloads . encodePayload ( payload ) )
163163 }
164164
165- getThreadList = async ( count : number ) : Promise < Thread [ ] > = > {
165+ async getThreadList ( count : number ) : Promise < Thread [ ] > {
166166 const threads = await this . httpApi . threadListQuery ( count )
167167 return threads . viewer . message_threads . nodes . map ( parseThread )
168168 }
0 commit comments