Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Commit

Permalink
Fix typo, add changes, bump version
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Boldyrev <[email protected]>
  • Loading branch information
zerobias committed Mar 26, 2017
1 parent b351e3e commit 3268713
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 2.2.2
* Fixed bug with cyrillic text encoding
* Fixed bug with several broken methods invocations
* Optimized authorization performance
* Added fix for automatic base data center selection by [@goodmind][]

# 2.2.1
* Flag (optional type) fields now acts like common fields.
* Zeroes, empty strings and empty types now can be omited. write only useful fields.
Expand Down Expand Up @@ -35,4 +41,6 @@ const connection = network.http({ host: 'ip', port: '80', protocol: 'https' })
const connection = network.wc({ host: 'ip', port: '80' })
```
* Precision timing
* Major performance boost
* Major performance boost

[@goodmind]: https://github.com/goodmind/
13 changes: 3 additions & 10 deletions examples/chat-history.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,12 @@ const printMessages = messages => {
}


const searchUsers = async () => {
const searchUsers = async (username) => {
const results = await telegram('contacts.search', {
q : '@goodmind',
q : username,
limit: 100,
})
const results2 = await telegram('contacts.search', {
q : 'goodmind',
limit: 100,
})
return {
results,
results2
}
return results
}

module.exports = {
Expand Down
12 changes: 6 additions & 6 deletions examples/from-readme.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ const phone = {
}

const api = {
layer : 57,
initConnection : 0x69796de9,
api_id : 49631
layer : 57,
initConnection: 0x69796de9,
api_id : 49631
}

const server = {
Expand All @@ -25,9 +25,9 @@ async function connect(){
api_hash : 'fb050b8f6771e15bfda5df2409931569'
})
const { user } = await client('auth.signIn', {
phone_number : phone.num,
phone_code_hash: phone_code_hash,
phone_code : phone.code
phone_number: phone.num,
phone_code_hash,
phone_code : phone.code
})

console.log('signed as ', user)
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
"babel-loader": "^6.4.1",
"babel-plugin-closure-elimination": "^1.1.14",
"babel-plugin-transform-async-to-generator": "^6.22.0",
"babel-plugin-transform-async-to-module-method": "^6.22.0",
"babel-plugin-transform-class-properties": "^6.23.0",
"babel-plugin-transform-es2015-block-scoping": "^6.23.0",
"babel-plugin-transform-es2015-for-of": "^6.23.0",
Expand Down Expand Up @@ -104,5 +103,5 @@
"type": "git",
"url": "git+https://github.com/zerobias/telegram-mtproto.git"
},
"version": "2.2.1"
"version": "2.2.2"
}
2 changes: 1 addition & 1 deletion src/tl/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export class Serialization {
// case 'bytes': fieldObj = [0]; break
}
}
else throw new Error(`Method ${methodName} doesnt recieve required argument ${paramName}`)
else throw new Error(`Method ${methodName} did not receive required argument ${paramName}`)
} else {
fieldObj = params[paramName]
}
Expand Down

0 comments on commit 3268713

Please sign in to comment.