Allowed server to update the chat list
This commit is contained in:
parent
79f73d3dbc
commit
2a4f48cec7
|
@ -376,6 +376,25 @@ function connect(profile, connection_id)
|
|||
profile_switch_to(connection_id);
|
||||
}
|
||||
}
|
||||
|
||||
// New chat
|
||||
if(data.mode == "new_chat")
|
||||
{
|
||||
console.log("New chat created");
|
||||
|
||||
// Set the data
|
||||
g.chats.push({
|
||||
name: data.name,
|
||||
messages: []
|
||||
});
|
||||
|
||||
// Update the screen if its active
|
||||
if(active_profile == connection_id)
|
||||
{
|
||||
// Refresh this profile
|
||||
profile_switch_to(connection_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue