Ability to change the username (the user ID is displayed by default)

This commit is contained in:
Yann Flory
2016-03-16 12:02:39 +01:00
parent 6e50ae94dd
commit eca4ec699c
3 changed files with 95 additions and 14 deletions

View File

@@ -271,19 +271,24 @@ define([
wc.onPeerMessage = function(peerId, type) {
onPeerMessage(peerId, type, wc);
};
if(config.setMyID) {
config.setMyID({
myID: wc.myID
});
}
// Open a Chainpad session
realtime = createRealtime();
if(config.onInit) {
config.onInit({
myID: wc.myID,
realtime: realtime,
webChannel: wc,
userList: userList
});
}
// Trigger onJoining with our own Cryptpad username to tell the toolbar that we are synced
onJoining(userName);
onJoining(wc.myID);
// we're fully synced
initializing = false;