lita-talk 0.1.2 → 0.1.3

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: 6a466eadb90f2e5695d0ab54ec9f3afb36f3a4b8
4
- data.tar.gz: 1d5b07f1a4bd2c4e5dcc7c7c572e3fa68cc9f67c
3
+ metadata.gz: f6ce1aff92356db9df8a3e6fb54cc42c8a6f86f0
4
+ data.tar.gz: 6c7c8321c39a6ecf5c0cf6a4fb0bb8c1c7aaeb06
5
5
  SHA512:
6
- metadata.gz: 71ee0c798ea0a628028edf5f23b1d291567657ece5496a90ecaecda748f948635b0c66d7e974e115a5a38687b568eddea11024d304f8361f44981acea75e7ab5
7
- data.tar.gz: a364ebc49446dc44f7b47eb9a850084332e53d3af6dab19f34abae8a99312bac6dd8979327859dbb810a4ec6f10331b246e99bfe462cb3921ccdd18ceede1fc8
6
+ metadata.gz: 29187f95a63d2a05930cb3b8ec96ff09c7a94ebbe2d7087756856ddc4fa780d5ad1c27de6460b0fcf238c040a7a74aea06bfbb3d6453ebc6ecf36773dff5fe58
7
+ data.tar.gz: 27c78ae68a8165e842a7b639750aa8a14be4ab5c6a68cc3f1078a764bbb122f5f3346bb5d5a553a8494b8803aa42702eb2d1b74acb3e4aa4a686af027e47019e
@@ -19,9 +19,13 @@ module Lita
19
19
  return if response.matches.flatten[0].match(route.pattern)
20
20
  end
21
21
 
22
+ if response.matches.flatten[0].match(/ところで|それはそうと|そういえば|BTW/)
23
+ Lita.redis.del context_key(response)
24
+ end
25
+
22
26
  context = Lita.redis.get context_key(response)
23
27
  api_response = client.create_dialogue(response.message.body, params(context))
24
- Lita.redis.set context_key(response), api_response.body["context"]
28
+ Lita.redis.setex context_key(response), 600, api_response.body["context"]
25
29
  response.reply api_response.body["utt"]
26
30
  end
27
31
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-talk"
3
- spec.version = "0.1.2"
3
+ spec.version = "0.1.3"
4
4
  spec.authors = ["fukayatsu"]
5
5
  spec.email = ["fukayatsu@gmail.com"]
6
6
  spec.description = "Talk with you if given message didn't match any other handlers."
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-talk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - fukayatsu