fixed problem with unread mentions and reposts
This commit is contained in:
parent
2b8782bed9
commit
9a999ba2cc
1 changed files with 21 additions and 14 deletions
|
@ -83,25 +83,32 @@ function(HostApp, Timeline, URI, Paths, Core) {
|
||||||
|
|
||||||
Mentions.prototype.updateLatestMentionRead = function() {
|
Mentions.prototype.updateLatestMentionRead = function() {
|
||||||
|
|
||||||
var status = this.body.firstChild.status;
|
for (var i = 0; i < this.body.childNodes.length; i++) {
|
||||||
|
|
||||||
if (status && status.type == "https://tent.io/types/post/status/v0.1.0") {
|
var status = this.body.childNodes[i].status;
|
||||||
|
|
||||||
var url = URI(Paths.mkApiRootPath("/profile/" + encodeURIComponent("https://tent.io/types/info/cursor/v0.1.0")));
|
if (!status.__repost) {
|
||||||
var body = {
|
if (status && status.type == "https://tent.io/types/post/status/v0.1.0") {
|
||||||
"mentions": {
|
|
||||||
"https://tent.io/types/post/status/v0.1.0": {
|
var url = URI(Paths.mkApiRootPath("/profile/" + encodeURIComponent("https://tent.io/types/info/cursor/v0.1.0")));
|
||||||
"post": status.id,
|
var body = {
|
||||||
"entity": status.entity
|
"mentions": {
|
||||||
|
"https://tent.io/types/post/status/v0.1.0": {
|
||||||
|
"post": status.id,
|
||||||
|
"entity": status.entity
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var callback = function(resp) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Paths.getURL(url.toString(), "PUT", callback, JSON.stringify(body));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
var callback = function(resp) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Paths.getURL(url.toString(), "PUT", callback, JSON.stringify(body));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue