showing who is replying in the active users block

This commit is contained in:
Julian Lam
2014-03-01 15:46:13 -05:00
parent ea222a4295
commit b3d7ae1c86
3 changed files with 53 additions and 2 deletions

View File

@@ -4,6 +4,15 @@ define(['taskbar'], function(taskbar) {
posts: {}
};
function initialise() {
socket.on('event:composer.ping', function(post_uuid) {
if (composer.active !== post_uuid) {
socket.emit('modules.composer.pingInactive', post_uuid);
}
});
};
initialise();
function maybeParse(response) {
if (typeof response == 'string') {
try {
@@ -380,6 +389,16 @@ define(['taskbar'], function(taskbar) {
} else {
composer.createNewComposer(post_uuid);
}
var tid = templates.get('topic_id');
if (tid) {
// Replying to a topic
socket.emit('modules.composer.register', {
uuid: post_uuid,
tid: templates.get('topic_id'),
uid: app.uid
});
}
};
composer.createNewComposer = function(post_uuid) {