|
|
@ -930,17 +930,17 @@ Value newpostmsg(const Array& params, bool fHelp) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// TODO: swarm resource forwarding not implemented
|
|
|
|
// TODO: swarm resource forwarding not implemented
|
|
|
|
ses->dht_putData(strUsername, "swarm", false, |
|
|
|
ses->dht_putData(strUsername, "swarm", false, |
|
|
|
v, strUsername, GetAdjustedTime(), k); |
|
|
|
v, strUsername, GetAdjustedTime(), 1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// post to dht as well
|
|
|
|
// post to dht as well
|
|
|
|
ses->dht_putData(strUsername, string("post")+strK, false, |
|
|
|
ses->dht_putData(strUsername, string("post")+strK, false, |
|
|
|
v, strUsername, GetAdjustedTime(), k); |
|
|
|
v, strUsername, GetAdjustedTime(), 1); |
|
|
|
|
|
|
|
|
|
|
|
// is this a reply? notify
|
|
|
|
// is this a reply? notify
|
|
|
|
if( strReplyN.length() ) { |
|
|
|
if( strReplyN.length() ) { |
|
|
|
ses->dht_putData(strReplyN, string("replies")+strReplyK, true, |
|
|
|
ses->dht_putData(strReplyN, string("replies")+strReplyK, true, |
|
|
|
v, strUsername, GetAdjustedTime(), k); |
|
|
|
v, strUsername, GetAdjustedTime(), 0); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// split and look for mentions and hashtags
|
|
|
|
// split and look for mentions and hashtags
|
|
|
@ -952,10 +952,10 @@ Value newpostmsg(const Array& params, bool fHelp) |
|
|
|
string word = token.substr(1); |
|
|
|
string word = token.substr(1); |
|
|
|
if( token.at(0) == '#') { |
|
|
|
if( token.at(0) == '#') { |
|
|
|
ses->dht_putData(word, "hashtag", true, |
|
|
|
ses->dht_putData(word, "hashtag", true, |
|
|
|
v, strUsername, GetAdjustedTime(), k); |
|
|
|
v, strUsername, GetAdjustedTime(), 0); |
|
|
|
} else if( token.at(0) == '@') { |
|
|
|
} else if( token.at(0) == '@') { |
|
|
|
ses->dht_putData(word, "mention", true, |
|
|
|
ses->dht_putData(word, "mention", true, |
|
|
|
v, strUsername, GetAdjustedTime(), k); |
|
|
|
v, strUsername, GetAdjustedTime(), 0); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -1046,19 +1046,19 @@ Value newrtmsg(const Array& params, bool fHelp) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// TODO: swarm resource forwarding not implemented
|
|
|
|
// TODO: swarm resource forwarding not implemented
|
|
|
|
ses->dht_putData(strUsername, "swarm", false, |
|
|
|
ses->dht_putData(strUsername, "swarm", false, |
|
|
|
v, strUsername, GetAdjustedTime(), k); |
|
|
|
v, strUsername, GetAdjustedTime(), 1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// post to dht as well
|
|
|
|
// post to dht as well
|
|
|
|
ses->dht_putData(strUsername, string("post")+strK, false, |
|
|
|
ses->dht_putData(strUsername, string("post")+strK, false, |
|
|
|
v, strUsername, GetAdjustedTime(), k); |
|
|
|
v, strUsername, GetAdjustedTime(), 1); |
|
|
|
|
|
|
|
|
|
|
|
// notification to keep track of RTs of the original post
|
|
|
|
// notification to keep track of RTs of the original post
|
|
|
|
if( rt ) { |
|
|
|
if( rt ) { |
|
|
|
string rt_user = rt->find_key("n")->string(); |
|
|
|
string rt_user = rt->find_key("n")->string(); |
|
|
|
string rt_k = boost::lexical_cast<std::string>(rt->find_key("k")->integer()); |
|
|
|
string rt_k = boost::lexical_cast<std::string>(rt->find_key("k")->integer()); |
|
|
|
ses->dht_putData(rt_user, string("rts")+rt_k, true, |
|
|
|
ses->dht_putData(rt_user, string("rts")+rt_k, true, |
|
|
|
v, strUsername, GetAdjustedTime(), k); |
|
|
|
v, strUsername, GetAdjustedTime(), 0); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return entryToJson(v); |
|
|
|
return entryToJson(v); |
|
|
|