mirror of
https://github.com/onyx-and-iris/obsws-ruby.git
synced 2026-04-13 11:23:31 +00:00
move identify payload out of auth block
patch bump
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -11,7 +11,7 @@ module OBSWS
|
||||
end
|
||||
|
||||
def patch
|
||||
2
|
||||
3
|
||||
end
|
||||
|
||||
def to_a
|
||||
|
||||
Reference in New Issue
Block a user