summaryrefslogtreecommitdiff
path: root/src/messagehandler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/messagehandler.cc')
-rw-r--r--src/messagehandler.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/messagehandler.cc b/src/messagehandler.cc
index 5f3cafb..89b476a 100644
--- a/src/messagehandler.cc
+++ b/src/messagehandler.cc
@@ -32,7 +32,7 @@
TaskManager taskman;
-MessageList handle_msg(MessageList msgList) {
+MessageList handle_msg(MessageList msgList, clientid_t wsi) {
MessageList::iterator it;
for(it = msgList.begin();
@@ -48,7 +48,7 @@ MessageList handle_msg(MessageList msgList) {
t.title = m.add.title;
t.desc = m.add.desc;
try {
- it->nodes = taskman.addTask(t, m.add.parentid);
+ it->nodes = taskman.addTask(t, m.add.parentid);
}
catch (std::exception& e) {
DEBUG(messagehandler, "Error adding task\n");
@@ -77,6 +77,12 @@ MessageList handle_msg(MessageList msgList) {
}
}
break;
+ case cmd::observe:
+ connection_handler.observe(wsi, m.observe.id);
+ break;
+ case cmd::unobserve:
+ connection_handler.unobserve(wsi, m.observe.id);
+ break;
case cmd::update:
{
INFO(messagehandler, "Handling update command\n");