postReply(postId, text, function(success, error, replyId) {
if (success) {
$(inputField).val("");
postReply(postId, text, function(success, error, replyId) {
if (success) {
$(inputField).val("");
markPostAsKnown(getPostElement(inputField));
$("#sone .post#" + postId + " .create-reply").addClass("hidden");
} else {
markPostAsKnown(getPostElement(inputField));
$("#sone .post#" + postId + " .create-reply").addClass("hidden");
} else {
});
/* process new replies. */
$.each(data.newReplies, function(index, value) {
});
/* process new replies. */
$.each(data.newReplies, function(index, value) {
});
/* do it again in 5 seconds. */
setTimeout(getStatus, 5000);
});
/* do it again in 5 seconds. */
setTimeout(getStatus, 5000);
-function loadNewPost(postId, soneId, recipientId) {
+function loadNewPost(postId, soneId, recipientId, time) {
- if (!isIndexPage() && (!isViewPostPage() || (getShownPostId() != postId))) {
- return;
+ if (!isIndexPage()) {
+ if (!isViewPostPage() || (getShownPostId() != postId)) {
+ if (!isViewSonePage() || ((getShownSoneId() != soneId) && (getShownSoneId() != recipientId))) {
+ return;
+ }
+ }
+ if (getPostTime($("#sone .post").last()) > time) {
+ return;
+ }
}
$.getJSON("getPost.ajax", { "post" : postId }, function(data, textStatus) {
if ((data != null) && data.success) {
}
$.getJSON("getPost.ajax", { "post" : postId }, function(data, textStatus) {
if ((data != null) && data.success) {
newPost = $(data.post.html).addClass("hidden");
if (firstOlderPost != null) {
newPost.insertBefore(firstOlderPost);
newPost = $(data.post.html).addClass("hidden");
if (firstOlderPost != null) {
newPost.insertBefore(firstOlderPost);
$.getJSON("getReply.ajax", { "reply": replyId }, function(data, textStatus) {
/* find post. */
if ((data != null) && data.success) {
$.getJSON("getReply.ajax", { "reply": replyId }, function(data, textStatus) {
/* find post. */
if ((data != null) && data.success) {
text = $(this).find(":input:enabled").val();
$.getJSON("createPost.ajax", { "formPassword": getFormPassword(), "text": text }, function(data, textStatus) {
if ((data != null) && data.success) {
text = $(this).find(":input:enabled").val();
$.getJSON("createPost.ajax", { "formPassword": getFormPassword(), "text": text }, function(data, textStatus) {
if ((data != null) && data.success) {
text = $(this).find(":input:enabled").val();
$.getJSON("createPost.ajax", { "formPassword": getFormPassword(), "recipient": getShownSoneId(), "text": text }, function(data, textStatus) {
if ((data != null) && data.success) {
text = $(this).find(":input:enabled").val();
$.getJSON("createPost.ajax", { "formPassword": getFormPassword(), "recipient": getShownSoneId(), "text": text }, function(data, textStatus) {
if ((data != null) && data.success) {