mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-11 07:17:53 +00:00
more hashtags separators and tolower
This commit is contained in:
parent
c3bea0a3dd
commit
57eeb6d73b
@ -1219,11 +1219,12 @@ Value newpostmsg(const Array& params, bool fHelp)
|
|||||||
|
|
||||||
// split and look for mentions and hashtags
|
// split and look for mentions and hashtags
|
||||||
vector<string> tokens;
|
vector<string> tokens;
|
||||||
boost::algorithm::split(tokens,strMsg,boost::algorithm::is_any_of(" \n\t"),
|
boost::algorithm::split(tokens,strMsg,boost::algorithm::is_any_of(" \n\t.,:/?!"),
|
||||||
boost::algorithm::token_compress_on);
|
boost::algorithm::token_compress_on);
|
||||||
BOOST_FOREACH(string const& token, tokens) {
|
BOOST_FOREACH(string const& token, tokens) {
|
||||||
if( token.length() >= 2 ) {
|
if( token.length() >= 2 ) {
|
||||||
string word = token.substr(1);
|
string word = token.substr(1);
|
||||||
|
boost::algorithm::to_lower(word);
|
||||||
if( token.at(0) == '#') {
|
if( token.at(0) == '#') {
|
||||||
ses->dht_putData(word, "hashtag", true,
|
ses->dht_putData(word, "hashtag", true,
|
||||||
v, strUsername, GetAdjustedTime(), 0);
|
v, strUsername, GetAdjustedTime(), 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user