wit_bot 0.3.1 → 0.3.2

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: 3b05d7a0df951c590c177bb54832b25d9d1ea395
4
- data.tar.gz: 8f3acd354bbbc09b6068cbbfda9a792ffe6f40d4
3
+ metadata.gz: d10dd1881f1d6790130b549a37e917153c5f98a2
4
+ data.tar.gz: b45b3b4cb14880cb82e52ac3796e234e4e7348e2
5
5
  SHA512:
6
- metadata.gz: c06cc461f4c667a17b787ad6f7e0f18d7a1c4170e6aa5285c47868c36a6ee975c540a0fd32d610e963db4ee6f20b0ea10f023da658206697386c796039ee370f
7
- data.tar.gz: 58120c12339d843bd2e2c2ed4d719a6dc9d34d179417ce6da224d8076746c9b16337cc3d17bc7f506eaca83a53de253710ee18cc31c9da697a4201836ad251d1
6
+ metadata.gz: f233ae557c9dbca4a91ebee6f9877bd53844a11faec2e61e5c1e2f3ad317ac8f5db9634edeca65455ab4c1321578010fc1941673d8fa2cdcd0f92a8733ac8ba7
7
+ data.tar.gz: 8b9ae3e37592c5a14647834cb7d5958f2c013e1352ea335935aa17c944048fea9a2f2d753a74880ad5a833d68b91f96b13e1589c7a68645e9ef69510a4fbfb41
@@ -16,12 +16,13 @@ module WitBot
16
16
  thread.messages_list user, bot
17
17
  end
18
18
 
19
- def send_message(text, sender=nil)
20
- sender && sender.bot? ? output(text) : input(text)
19
+ def send_message(text, sender=nil, meta=nil)
20
+ sender && sender.bot? ? output(text, meta) : input(text, meta)
21
21
  end
22
22
 
23
- def input(input)
23
+ def input(input, meta=nil)
24
24
  message = thread.create_message input
25
+ message.meta = meta
25
26
  message.send 1, false
26
27
  changed
27
28
  notify_observers :input, message
@@ -32,8 +33,9 @@ module WitBot
32
33
  listener_class.new self
33
34
  end
34
35
 
35
- def output(text)
36
+ def output(text, meta=nil)
36
37
  message = thread.create_bot_message text
38
+ message.meta = meta
37
39
  changed
38
40
  notify_observers :output, message
39
41
  message
@@ -13,8 +13,8 @@ module WitBot
13
13
  true
14
14
  end
15
15
 
16
- def send_message(text)
17
- @conversation.send_message text, self
16
+ def send_message(text, meta=nil)
17
+ @conversation.send_message text, self, meta
18
18
  end
19
19
 
20
20
  # Alias is deprecated.
@@ -1,3 +1,3 @@
1
1
  module WitBot
2
- VERSION = '0.3.1'
2
+ VERSION = '0.3.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wit_bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben (@penne12_)