|
|
@ -283,15 +283,37 @@ function newPostMsg(msg, reply_n, reply_k, cbFunc, cbReq) { |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function newRtMsg(postData, msg) { |
|
|
|
function newRtMsg(userpost, sig_userpost, comment, cbFunc, cbReq) { |
|
|
|
var userpost = $.evalJSON(postData.attr('data-content_to_rt')); |
|
|
|
if (typeof lastPostId === 'undefined') { |
|
|
|
var sig_userpost; |
|
|
|
alertPopup({ |
|
|
|
|
|
|
|
//txtTitle: polyglot.t(''), add some title (not 'error', please) or just KISS
|
|
|
|
|
|
|
|
txtMessage: 'Can\'t handle the retwisting of a twist —\n' |
|
|
|
|
|
|
|
+ polyglot.t('Internal error: lastPostId unknown (following yourself may fix!)') |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (typeof _sendedPostIDs !== 'object') { |
|
|
|
|
|
|
|
alertPopup({ |
|
|
|
|
|
|
|
//txtTitle: polyglot.t(''), add some title (not 'error', please) or just KISS
|
|
|
|
|
|
|
|
txtMessage: 'Can\'t handle the retwisting of a twist —\n' |
|
|
|
|
|
|
|
+ polyglot.t('this is undefined', {'this': '_sendedPostIDs'}) |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (typeof userpost !== 'object') { |
|
|
|
|
|
|
|
alertPopup({ |
|
|
|
|
|
|
|
//txtTitle: polyglot.t(''), add some title (not 'error', please) or just KISS
|
|
|
|
|
|
|
|
txtMessage: 'Can\'t handle the retwisting of a twist —\n' |
|
|
|
|
|
|
|
+ polyglot.t('this is undefined', {'this': 'userpost'}) |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
if (userpost.rt) { |
|
|
|
if (userpost.rt) { |
|
|
|
if (parseInt(twisterVersion) <= 93000) { |
|
|
|
if (parseInt(twisterVersion) <= 93000) { |
|
|
|
alertPopup({ |
|
|
|
alertPopup({ |
|
|
|
//txtTitle: polyglot.t(''), add some title (not 'error', please) or just KISS
|
|
|
|
//txtTitle: polyglot.t(''), add some title (not 'error', please) or just KISS
|
|
|
|
txtMessage: 'Can\'t handle retwisting of commented retwisted twists —\n' |
|
|
|
txtMessage: 'Can\'t handle the retwisting of commented retwisted twists —\n' |
|
|
|
+ polyglot.t('daemon_is_obsolete', {versionReq: '0.9.3+'}) |
|
|
|
+ polyglot.t('daemon_is_obsolete', {versionReq: '0.9.3+'}) |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
@ -302,14 +324,11 @@ function newRtMsg(postData, msg) { |
|
|
|
userpost.rt = undefined; |
|
|
|
userpost.rt = undefined; |
|
|
|
userpost.sig_rt = undefined; |
|
|
|
userpost.sig_rt = undefined; |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
|
|
|
|
sig_userpost = postData.attr('data-content_to_sigrt'); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!sig_userpost) { |
|
|
|
if (!sig_userpost) { |
|
|
|
alertPopup({ |
|
|
|
alertPopup({ |
|
|
|
//txtTitle: polyglot.t(''), add some title (not 'error', please) or just KISS
|
|
|
|
//txtTitle: polyglot.t(''), add some title (not 'error', please) or just KISS
|
|
|
|
txtMessage: 'Can\'t handle retwisting of a twist —\n' |
|
|
|
txtMessage: 'Can\'t handle the retwisting of a twist —\n' |
|
|
|
+ polyglot.t('this is undefined', {'this': 'sig_userpost'}) |
|
|
|
+ polyglot.t('this is undefined', {'this': 'sig_userpost'}) |
|
|
|
}); |
|
|
|
}); |
|
|
|
return; |
|
|
|
return; |
|
|
@ -317,26 +336,27 @@ function newRtMsg(postData, msg) { |
|
|
|
|
|
|
|
|
|
|
|
userpost.sig_wort = undefined; |
|
|
|
userpost.sig_wort = undefined; |
|
|
|
|
|
|
|
|
|
|
|
var rtObj = {sig_userpost: sig_userpost, userpost: userpost}; |
|
|
|
_sendedPostIDs.push(lastPostId + 1); |
|
|
|
|
|
|
|
|
|
|
|
if (typeof lastPostId !== 'undefined') { |
|
|
|
|
|
|
|
if (typeof _sendedPostIDs !== 'undefined') |
|
|
|
|
|
|
|
_sendedPostIDs.push(lastPostId + 1); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var params = [defaultScreenName, lastPostId + 1, rtObj]; |
|
|
|
var req = [defaultScreenName, lastPostId + 1, |
|
|
|
|
|
|
|
{sig_userpost: sig_userpost, userpost: userpost}]; |
|
|
|
|
|
|
|
if (typeof comment !== 'undefined') |
|
|
|
|
|
|
|
req.push(comment); |
|
|
|
|
|
|
|
|
|
|
|
if (typeof msg !== 'undefined') |
|
|
|
twisterRpc('newrtmsg', req, |
|
|
|
params.push(msg); |
|
|
|
function(req, ret) { |
|
|
|
|
|
|
|
incLastPostId(); |
|
|
|
twisterRpc('newrtmsg', params, |
|
|
|
if (typeof req.cbFunc === 'function') |
|
|
|
function(arg, ret) {incLastPostId();}, null, |
|
|
|
req.cbFunc(req.cbReq, ret); |
|
|
|
function(arg, ret) {var msg = ('message' in ret) ? ret.message : ret; |
|
|
|
}, {cbFunc: cbFunc, cbReq: cbReq}, |
|
|
|
alert(polyglot.t('ajax_error', {error: msg})); |
|
|
|
function(req, ret) { |
|
|
|
}, null |
|
|
|
alertPopup({ |
|
|
|
); |
|
|
|
//txtTitle: polyglot.t(''), add some title (not 'error', please) or just KISS
|
|
|
|
} else { |
|
|
|
txtMessage: 'Can\'t handle the retwisting of a twist —\n' |
|
|
|
alert(polyglot.t('Internal error: lastPostId unknown (following yourself may fix!)')); |
|
|
|
+ polyglot.t('ajax_error', {error: (ret.message) ? ret.message : ret}) |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function newFavMsg(postData, priv, msg) { |
|
|
|
function newFavMsg(postData, priv, msg) { |
|
|
|