-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
29 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"singleQuote": true, | ||
"endOfLine": "auto", | ||
"endOfLine": "crlf", | ||
"useTabs": false, | ||
"trailingComma": "none" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,8 +66,6 @@ import { Message, SendFileResult, SendStickerResult } from '../model'; | |
import { ChatState } from '../model/enum'; | ||
import { ListenerLayer } from './listener.layer'; | ||
import { Scope, checkValuesSender } from '../helpers/layers-interface'; | ||
|
||
|
||
let obj: Scope; | ||
|
||
export class SenderLayer extends ListenerLayer { | ||
|
@@ -111,7 +109,11 @@ export class SenderLayer extends ListenerLayer { | |
* @param to chat id: [email protected] | ||
* @param content text message | ||
*/ | ||
public async sendText(to: string, content: string, extra?: any): Promise<Object> { | ||
public async sendText( | ||
to: string, | ||
content: string, | ||
extra?: any | ||
): Promise<Object> { | ||
if (!extra) extra = {}; | ||
return new Promise(async (resolve, reject) => { | ||
const typeFunction = 'sendText'; | ||
|
@@ -1031,7 +1033,7 @@ export class SenderLayer extends ListenerLayer { | |
public async setChatState(chatId: string, chatState: ChatState) { | ||
return await this.page.evaluate( | ||
({ chatState, chatId }) => { | ||
return WAPI.sendChatstate(chatState, chatId); | ||
return WAPI.sendChatstate(chatState, chatId); | ||
}, | ||
{ chatState, chatId } | ||
); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters