telegram-ruby 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 70eaf9fcc2201790d04dd5d3f869381e7bfa3fdd71251b829c3c4966ec774303
4
- data.tar.gz: ca1b6479195e5b7875af8c121aa459d248cbebbdd1751ae65c4a7d7047993a38
3
+ metadata.gz: b3b1e7a9c5751ecc45a63b9dcf1ac0e2a09745397e3dc1babed2429b1dec1fe2
4
+ data.tar.gz: ff4a033d1d463d0bc37723aa85c9443d2736183442fc09b6c88cd0fdc65f9a83
5
5
  SHA512:
6
- metadata.gz: b2533124cc5c0788c7bfdc368d0fac47a84209ec2a4c9953650e96f3d07be9d33fcefdfd5c775be4c9c6c2ef8bc55cb2f91142fdefddbaa4b82a24922e242f0e
7
- data.tar.gz: 577e5597e564440d9cd59e750a88f418a03a2d632def2b5cba3f2f2b7229a6b36c43e1b04f0328dc31e23b0681c798ff0a716cf9b5fc317e7c0c5ec011c4efc3
6
+ metadata.gz: 1398d1b87930c7ad729df49c057e2b840c45ab6273cefb615fb66391a7bdc0a7cb22fa00a8613b0c6afeebe4ac2e1ba588036304d3394d457e32a5dcda9e2bda
7
+ data.tar.gz: baf81c76ee15444b47af23b7185abf8e9891bdeec3bcc0232a2721ea87b715119698d3e07f117b99df0d6ca28d33671a9f0dcd5940d8dabc46847046dc874afc
@@ -7,7 +7,7 @@ module Telegram::Bot
7
7
  auth_data = auth_data.slice(:auth_date, :first_name, :id, :last_name, :photo_url, :username)
8
8
  check_string = auth_data.map {|k, v| "#{k}=#{v}" }.sort.join("\n")
9
9
 
10
- secret_key = OpenSSL::Digest::SHA256.new.digest('523479371:AAHutDxVN_4NI5oBmIMj8mfmn47bbOWqD70')
10
+ secret_key = OpenSSL::Digest::SHA256.new.digest(Bot.configuration.token)
11
11
  hash = OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha256'), secret_key, check_string)
12
12
 
13
13
  raise Telegram::Bot::LoginError.new('Data is NOT from Telegram') if (hash.casecmp(check_hash) != 0)
@@ -1,3 +1,3 @@
1
1
  module Telegram
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telegram-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Belenky