mirror of
https://github.com/onyx-and-iris/obsws-ruby.git
synced 2025-01-18 21:40:48 +00:00
move identify payload out of auth block
patch bump
This commit is contained in:
parent
aafcd185d0
commit
bc93654297
@ -1,7 +1,7 @@
|
|||||||
PATH
|
PATH
|
||||||
remote: .
|
remote: .
|
||||||
specs:
|
specs:
|
||||||
obsws (0.1.2)
|
obsws (0.1.3)
|
||||||
observer (~> 0.1.1)
|
observer (~> 0.1.1)
|
||||||
waitutil (~> 0.2.1)
|
waitutil (~> 0.2.1)
|
||||||
websocket-driver (~> 0.7.5)
|
websocket-driver (~> 0.7.5)
|
||||||
|
@ -75,11 +75,6 @@ module OBSWS
|
|||||||
end
|
end
|
||||||
|
|
||||||
def identify(auth)
|
def identify(auth)
|
||||||
if auth
|
|
||||||
if @password.empty?
|
|
||||||
raise OBSWSError("auth enabled but no password provided")
|
|
||||||
end
|
|
||||||
LOGGER.info("initiating authentication")
|
|
||||||
payload = {
|
payload = {
|
||||||
op: Mixin::OPCodes::IDENTIFY,
|
op: Mixin::OPCodes::IDENTIFY,
|
||||||
d: {
|
d: {
|
||||||
@ -87,6 +82,11 @@ module OBSWS
|
|||||||
eventSubscriptions: @subs
|
eventSubscriptions: @subs
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if auth
|
||||||
|
if @password.empty?
|
||||||
|
raise OBSWSError("auth enabled but no password provided")
|
||||||
|
end
|
||||||
|
LOGGER.info("initiating authentication")
|
||||||
payload[:d][:authentication] = auth_token(**auth)
|
payload[:d][:authentication] = auth_token(**auth)
|
||||||
end
|
end
|
||||||
@driver.text(JSON.generate(payload))
|
@driver.text(JSON.generate(payload))
|
||||||
|
@ -11,7 +11,7 @@ module OBSWS
|
|||||||
end
|
end
|
||||||
|
|
||||||
def patch
|
def patch
|
||||||
2
|
3
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_a
|
def to_a
|
||||||
|
Loading…
Reference in New Issue
Block a user