lita-discord_oauth 0.1.2.alpha.64 → 0.1.2.alpha.65

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 28522a5911103c1f192aece3ddfa412d8ccb8eb1
4
- data.tar.gz: d82add731591900f487538ebff94ebeb93317761
3
+ metadata.gz: aceaf3e5580d37dd045896fcc80f42863320360a
4
+ data.tar.gz: b9658aaae0205da437a3ca3d6a491ec303bc0bb0
5
5
  SHA512:
6
- metadata.gz: 92ec0c882d9a608ee279f5741c0f583e5cd8d03ec38ae72424c6aa3d0366a347e3ab9d39a6e130af5c6eddd9607aaba02e7504084be01da4e2fef71272552a8c
7
- data.tar.gz: d8c78be07b75453d78bf1509fd410d9a5cf4061082c800a3957ae3751c1bdfb5ddbaad4d1cc97a584dbfe16acdcfafa1d9e9852ca41102662fe0eb9434d3493b
6
+ metadata.gz: 8feb747f738039ee5b8d44d0c21959e6cab1774ea01cc21c543a0829aaf23b8a9a489f4d85dbd70a4f475df2db045aaac8eb217d67ceb7e357e2fb3827a3429d
7
+ data.tar.gz: f262c27029309473c8951e0b97b64153505001e801e205cfaf2d7fdea3cfc0d3885a6d4a5bade0ed3699e45fb84d2053c0f6169bb1bad25a68b077446b6c205d
@@ -30,13 +30,13 @@ module Lita
30
30
 
31
31
  def split_message(message)
32
32
  max_length = 2000 - 25 # Substract 25 for mention safety
33
+ messages = Array.new
33
34
 
34
35
  if message.length < max_length
35
- [message]
36
+ messages.push(message)
36
37
  else
37
38
  parsed = ''
38
39
  message_copy = message
39
- messages = Array.new
40
40
 
41
41
  while parsed != message do
42
42
  part = get_message_part(message_copy, max_length)
@@ -47,9 +47,9 @@ module Lita
47
47
  parsed += part
48
48
  message_copy = message_copy[part.length - 1, -1]
49
49
  end
50
-
51
-
52
50
  end
51
+
52
+ messages
53
53
  end
54
54
 
55
55
  def get_message_part(message, limit)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-discord_oauth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2.alpha.64
4
+ version: 0.1.2.alpha.65
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cas Eliëns