mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-10 23:07:52 +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
|
||||
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_FOREACH(string const& token, tokens) {
|
||||
if( token.length() >= 2 ) {
|
||||
string word = token.substr(1);
|
||||
boost::algorithm::to_lower(word);
|
||||
if( token.at(0) == '#') {
|
||||
ses->dht_putData(word, "hashtag", true,
|
||||
v, strUsername, GetAdjustedTime(), 0);
|
||||
|
Loading…
Reference in New Issue
Block a user