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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d10dd1881f1d6790130b549a37e917153c5f98a2
|
4
|
+
data.tar.gz: b45b3b4cb14880cb82e52ac3796e234e4e7348e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/wit_bot/version.rb
CHANGED