Skip to content

Commit

Permalink
Merge pull request #23 from pipex/master
Browse files Browse the repository at this point in the history
Add chatTitle client option
  • Loading branch information
jehy committed Aug 29, 2019
2 parents 19dc05d + e93877c commit 12dbeb3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/telegramClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class TelegramClient {
this.timeout = options.timeout || 1000;
this.interval = options.interval || 100;
this.chatId = options.chatId || 1;
this.chatTitle = options.chatTitle || options.firstName || 'Test Name';
this.firstName = options.firstName || 'TestName';
this.userName = options.userName || 'testUserName';
this.type = options.type || 'private';
Expand Down Expand Up @@ -44,6 +45,7 @@ class TelegramClient {
* },
* chat: {
* id: number,
* title: string,
* first_name: string,
* username: string,
* type: string,
Expand All @@ -59,6 +61,7 @@ class TelegramClient {
from: {id: this.userId, first_name: this.firstName, username: this.userName},
chat: {
id: this.chatId,
title: this.chatTitle,
first_name: this.firstName,
username: this.userName,
type: this.type,
Expand Down

0 comments on commit 12dbeb3

Please sign in to comment.