diff --git a/Gemfile.lock b/Gemfile.lock index e259bc6..9e54b94 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - obsws (0.1.2) + obsws (0.1.3) observer (~> 0.1.1) waitutil (~> 0.2.1) websocket-driver (~> 0.7.5) diff --git a/lib/obsws/base.rb b/lib/obsws/base.rb index ed44c39..5b17933 100644 --- a/lib/obsws/base.rb +++ b/lib/obsws/base.rb @@ -75,18 +75,18 @@ module OBSWS end def identify(auth) + payload = { + op: Mixin::OPCodes::IDENTIFY, + d: { + rpcVersion: 1, + eventSubscriptions: @subs + } + } if auth if @password.empty? raise OBSWSError("auth enabled but no password provided") end LOGGER.info("initiating authentication") - payload = { - op: Mixin::OPCodes::IDENTIFY, - d: { - rpcVersion: 1, - eventSubscriptions: @subs - } - } payload[:d][:authentication] = auth_token(**auth) end @driver.text(JSON.generate(payload)) diff --git a/lib/obsws/version.rb b/lib/obsws/version.rb index 9cd2216..013e000 100644 --- a/lib/obsws/version.rb +++ b/lib/obsws/version.rb @@ -11,7 +11,7 @@ module OBSWS end def patch - 2 + 3 end def to_a