mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-22 20:44:56 +00:00
fix bug where "follow" failed for empty users (who followed no one)
This commit is contained in:
parent
c61f016b44
commit
0903a9e0ec
@ -1595,10 +1595,9 @@ Value follow(const Array& params, bool fHelp)
|
||||
string username = users[u].get_str();
|
||||
torrent_handle h = startTorrentUser(username);
|
||||
|
||||
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);
|
||||
if( h.is_valid() ) {
|
||||
LOCK(cs_twister);
|
||||
m_users[localUser].m_following.insert(username);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user