fixed #4
This commit is contained in:
parent
136680e03a
commit
39010eff6b
3 changed files with 9 additions and 4 deletions
|
@ -9,12 +9,12 @@
|
|||
<title>Version 0.1.1</title>
|
||||
<sparkle:minimumSystemVersion>10.5.0</sparkle:minimumSystemVersion>
|
||||
<sparkle:releaseNotesLink>http://jabs.nu/Tentia/download/ReleaseNotes.html</sparkle:releaseNotesLink>
|
||||
<pubDate>Sat, 03 Nov 2012 03:16:09 +0100</pubDate>
|
||||
<pubDate>Sat, 03 Nov 2012 03:21:16 +0100</pubDate>
|
||||
<enclosure url="http://jabs.nu/Tentia/download/Tentia.app.zip"
|
||||
sparkle:version="0.1.1"
|
||||
length="631057"
|
||||
type="application/octet-stream"
|
||||
sparkle:dsaSignature="MCwCFBIWYzANyXNp9wvyQdOeJZ+FN/JFAhQV+ubR0l8jEX3gIgPPyNMp5iIxGA==" />
|
||||
sparkle:dsaSignature="MCwCFHtN6ajYp972vjGx2JGi8b/a5u6GAhRbVbHvROeCyt59OAbDfy0nNBan/A==" />
|
||||
</item>
|
||||
</channel>
|
||||
</rss>
|
||||
|
|
|
@ -215,10 +215,12 @@
|
|||
|
||||
- (IBAction)sendTweet:(id)sender {
|
||||
TweetModel *tweet = (TweetModel *)[sender object];
|
||||
NSString *text = [[tweet.text stringByReplacingOccurrencesOfString:@"\"" withString:@"\\\""] stringByReplacingOccurrencesOfString:@"\\" withString:@"\\\\"];
|
||||
NSString *func = [NSString stringWithFormat:@"tentia_instance.sendNewMessage(\"%@\", \"%@\", \"%@\")",
|
||||
[tweet.text stringByReplacingOccurrencesOfString:@"\"" withString:@"\\\""],
|
||||
text,
|
||||
tweet.inReplyTostatusId,
|
||||
tweet.inReplyToEntity];
|
||||
NSLog(@"%@", func);
|
||||
[timelineView stringByEvaluatingJavaScriptFromString:func];
|
||||
}
|
||||
|
||||
|
|
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