Allow tutorial bot to send messages to a stream.

But only allow them to send to tutorial-<<your username>>.

The idea being that this helps reduce potential abuse from this JSON
call. (Because otherwise, anyone could call into this endpoint and
have the tutorial bot send random messages to random peoples's
streams.)

(imported from commit 471d4348d7ad43858b5df240e4f1dceba006aab6)
This commit is contained in:
Waseem Daher
2013-03-05 13:57:38 -05:00
parent ad5bb68906
commit ca127f8228
2 changed files with 36 additions and 17 deletions

View File

@@ -28,7 +28,8 @@ function send_message(message) {
dataType: 'json',
url: '/json/tutorial_send_message',
type: 'POST',
data: {'message': message}
data: {'type': 'private',
'content': message}
});
}