selfsdk 0.0.208 → 0.0.209
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/messaging.rb +7 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4adb1d39e345e27532a012a26dcd8711fc245b2e93baa81890c6539cd8cf5424
|
4
|
+
data.tar.gz: d2e725fb3ab955237186ba7c5d9eca6e2083e4a4144b4a1f7d59b96f92e7ee59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a916f8c596495f580ee4b29c8e253325be6409133bb5eafb7df398b8848aef5148acc44cee6302d3ad25a1136c9e2344add606290ad49f2bc0be7a081b83b939
|
7
|
+
data.tar.gz: 51790af7cb7fb53f911c7484584deb733f4d55b9d151b23a4086cab356946cf95c066449a307dd20be755ea33a0db0d287596bb247414446de89f2d3b8866e9e
|
data/lib/messaging.rb
CHANGED
@@ -439,9 +439,7 @@ module SelfSDK
|
|
439
439
|
end
|
440
440
|
|
441
441
|
def process_incomming_message(input)
|
442
|
-
message =
|
443
|
-
@offset = input.offset
|
444
|
-
write_offset(@offset)
|
442
|
+
message = parse_and_write_offset(input)
|
445
443
|
|
446
444
|
if @messages.include? message.id
|
447
445
|
message.validate! @messages[message.id][:original_message]
|
@@ -459,6 +457,12 @@ module SelfSDK
|
|
459
457
|
nil
|
460
458
|
end
|
461
459
|
|
460
|
+
def parse_and_write_offset(input)
|
461
|
+
SelfSDK::Messages.parse(input, self)
|
462
|
+
ensure
|
463
|
+
write_offset(input.offset)
|
464
|
+
end
|
465
|
+
|
462
466
|
# Authenticates current client on the websocket server.
|
463
467
|
def authenticate
|
464
468
|
@auth_id = SecureRandom.uuid if @auth_id.nil?
|