OSDN Git Service
(root)
/
simple-tornado-bot
/
simple-tornado-bot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
わかりません
[simple-tornado-bot/simple-tornado-bot.git]
/
bot.py
diff --git
a/bot.py
b/bot.py
index
8ebf2ab
..
7126348
100644
(file)
--- a/
bot.py
+++ b/
bot.py
@@
-55,7
+55,7
@@
class WebHookHandler(tornado.web.RequestHandler):
return ans
def post(self):
return ans
def post(self):
- header = self.request.headers.get('X-Line-Signature')
+ header = self.request.headers.get('X-Line-Signature'
,''
)
body = tornado.escape.json_decode(self.request.body)
'''
hashid = hmac.new(header.get('X-Line-Signature'),
body = tornado.escape.json_decode(self.request.body)
'''
hashid = hmac.new(header.get('X-Line-Signature'),
@@
-76,6
+76,7
@@
class WebHookHandler(tornado.web.RequestHandler):
'''
event = body
linebot.reply_message(event['replytoken'],text=self.main(event['message']['text']))
'''
event = body
linebot.reply_message(event['replytoken'],text=self.main(event['message']['text']))
+
class DummyHandler(tornado.web.RequestHandler):
def get(self):
f = open('data.txt')
class DummyHandler(tornado.web.RequestHandler):
def get(self):
f = open('data.txt')