lita-discord_oauth 0.1.2.alpha.73 → 0.1.2.alpha.74

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: a91b8be51f7228e54f7b0f7f0fc1a8a4dd628c0a
4
- data.tar.gz: af1b74c06168ad0472e82abed0c7f4fa06a350a3
3
+ metadata.gz: 3cbb7c68e204f1e97e4cda27a8af27f69da90d8f
4
+ data.tar.gz: e5dd67f84b1d36ca8cb092a7c60122c91e0151f3
5
5
  SHA512:
6
- metadata.gz: 5cb99d69ea26db85d61f64a43710fa07a39f0f5c069c7eae1bd7ba534d966702ac8088966770c5566b6cad8d0c1ec0e921f260897fa0d186bf8b3239f8673264
7
- data.tar.gz: 9eb151a2759d676cc5478b4a3877d9bba7ce894d98a3f064d9adbf238e7a2a7aa7e62f8549e3962c7fd0ca078394e36a6779329d70ebbc3a025a93a20eed86d4
6
+ metadata.gz: 0842a50a880c0273c750376264be5b745c726212079d49b90ad8b046777ab0ac32bc7ac4d5b7a382e82ac770568658ca5573ac8ba660f350f981a569f2f91a7d
7
+ data.tar.gz: f0616fa903da16c1f0e8191a20cb084c6a67cf99d436f563ec66ced0383c82a322fa694e4fc5c975cc9dbecf34a74dac2e21a74d0179a178319da03084216c1a
@@ -54,12 +54,14 @@ module Lita
54
54
  end
55
55
 
56
56
  def get_message_part(message, limit)
57
+ message if message.length < limit # No need to check anything if the message is short enough
58
+
57
59
  part = message.to_s[0...limit - 1]
58
60
  break_index = part.rindex("\n")
59
61
 
60
62
  Lita.logger.debug("Break index: #{break_index}")
61
63
 
62
- if break_index != nil
64
+ if break_index != nil && break_index != 0
63
65
  message[0, break_index]
64
66
  else
65
67
  message
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.73
4
+ version: 0.1.2.alpha.74
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cas Eliëns