Browse Source

fix bug where "follow" failed for empty users (who followed no one)

miguelfreitas
Miguel Freitas 11 years ago
parent
commit
0903a9e0ec
  1. 3
      src/twister.cpp

3
src/twister.cpp

@ -1595,9 +1595,8 @@ Value follow(const Array& params, bool fHelp) @@ -1595,9 +1595,8 @@ Value follow(const Array& params, bool fHelp)
string username = users[u].get_str();
torrent_handle h = startTorrentUser(username);
if( h.is_valid() ) {
LOCK(cs_twister);
if( h.is_valid() && m_users.count(localUser) &&
!m_users[localUser].m_following.count(username) ) {
m_users[localUser].m_following.insert(username);
}
}

Loading…
Cancel
Save