mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 14:05:46 +01:00
fixing bug where an anonymous user could follow a topic... yikes
This commit is contained in:
@@ -189,7 +189,16 @@
|
||||
set_follow_state(state, true);
|
||||
});
|
||||
socket.on('api:topic.follow', function(data) {
|
||||
set_follow_state(data.follow);
|
||||
if (data.status && data.status === 'ok') set_follow_state(data.follow);
|
||||
else {
|
||||
app.alert({
|
||||
type: 'error',
|
||||
alert_id: 'topic_follow',
|
||||
title: 'Please Log In',
|
||||
message: 'Please register or log in in order to subscribe to this topic',
|
||||
timeout: 5000
|
||||
});
|
||||
}
|
||||
});
|
||||
socket.emit('api:topic.followCheck', tid);
|
||||
followEl[0].addEventListener('click', function() {
|
||||
|
||||
Reference in New Issue
Block a user