fixed #4
This commit is contained in:
parent
136680e03a
commit
39010eff6b
3 changed files with 9 additions and 4 deletions
5
Core.js
5
Core.js
|
|
@ -261,13 +261,14 @@ Core.prototype.getNewData = function() {
|
|||
|
||||
|
||||
Core.prototype.sendNewMessage = function(content, in_reply_to_status_id, in_reply_to_entity) {
|
||||
debug(content)
|
||||
|
||||
var _this = this;
|
||||
|
||||
var url = URI(mkApiRootPath("/posts"));
|
||||
|
||||
var http_method = "POST";
|
||||
var callback = function(data) { _this.getNewData(true); }
|
||||
var callback = function(data) { _this.getNewData(); }
|
||||
|
||||
var data = {
|
||||
"type": "https://tent.io/types/post/status/v0.1.0",
|
||||
|
|
@ -285,6 +286,8 @@ Core.prototype.sendNewMessage = function(content, in_reply_to_status_id, in_repl
|
|||
data["mentions"] = mentions;
|
||||
}
|
||||
|
||||
debug(JSON.stringify(data))
|
||||
|
||||
getURL(url.toString(), http_method, callback, JSON.stringify(data)); // FIXME: error callback
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue