selfsdk 0.0.206 → 0.0.207
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/chat/file_object.rb +3 -1
- 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: 565f3e3071fcb9d7f8686480e0890af54c1b6ee55996453e24028f3c2050803e
|
4
|
+
data.tar.gz: 16ed62893ffd1f8ef278e8626f4fc26279fa71b77e40c2d7135f0f39ed9e660a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58019c1d8e3c7ccb93b0dbdc9a577a662465628708baddbf26cf5f065c98094e187bb8b20b781d9715b51169b8e330f9d602e97b4d54cda45c7d8e57671b1de4
|
7
|
+
data.tar.gz: 644041c1d742e1a5886a981c744c31ac324ce1ddecdef842157babd82a796df8f1d921e6fe2a5379f4ef83267a245c6b59bb88321e8989668531f7b78ff7913c
|
data/lib/chat/file_object.rb
CHANGED
@@ -36,12 +36,14 @@ module SelfSDK
|
|
36
36
|
def build_from_object(input)
|
37
37
|
# Download from CDN
|
38
38
|
ciphertext = ""
|
39
|
+
link = input[:link]
|
39
40
|
5.times do
|
40
41
|
begin
|
41
|
-
ciphertext = URI.open(
|
42
|
+
ciphertext = URI.open(link, "Authorization" => "Bearer #{@token}").read
|
42
43
|
break
|
43
44
|
rescue => e
|
44
45
|
SelfSDK.logger.info "error fetching #{input[:link]} : #{e.message}"
|
46
|
+
link = link.replace("localhost:8080", "api:8080")
|
45
47
|
sleep 1
|
46
48
|
end
|
47
49
|
end
|