don't change the hash from realtime input
let applications handle that logic
This commit is contained in:
parent
d576fdc886
commit
5f4825f3a0
@ -101,14 +101,6 @@ define([
|
|||||||
};
|
};
|
||||||
|
|
||||||
var onReady = function(wc, network) {
|
var onReady = function(wc, network) {
|
||||||
if(config.onInit) {
|
|
||||||
config.onInit({
|
|
||||||
myID: wc.myID,
|
|
||||||
realtime: realtime,
|
|
||||||
getLag: network.getLag,
|
|
||||||
userList: userList
|
|
||||||
});
|
|
||||||
}
|
|
||||||
// Trigger onJoining with our own Cryptpad username to tell the toolbar that we are synced
|
// Trigger onJoining with our own Cryptpad username to tell the toolbar that we are synced
|
||||||
onJoining(wc.myID);
|
onJoining(wc.myID);
|
||||||
|
|
||||||
@ -206,7 +198,6 @@ define([
|
|||||||
|
|
||||||
var onOpen = function(wc, network) {
|
var onOpen = function(wc, network) {
|
||||||
channel = wc.id;
|
channel = wc.id;
|
||||||
window.location.hash = channel + chanKey;
|
|
||||||
|
|
||||||
// Add the existing peers in the userList
|
// Add the existing peers in the userList
|
||||||
wc.members.forEach(onJoining);
|
wc.members.forEach(onJoining);
|
||||||
@ -218,7 +209,6 @@ define([
|
|||||||
wc.on('join', onJoining);
|
wc.on('join', onJoining);
|
||||||
wc.on('leave', onLeaving);
|
wc.on('leave', onLeaving);
|
||||||
|
|
||||||
|
|
||||||
if(config.setMyID) {
|
if(config.setMyID) {
|
||||||
config.setMyID({
|
config.setMyID({
|
||||||
myID: wc.myID
|
myID: wc.myID
|
||||||
@ -227,6 +217,18 @@ define([
|
|||||||
// Open a Chainpad session
|
// Open a Chainpad session
|
||||||
realtime = createRealtime();
|
realtime = createRealtime();
|
||||||
|
|
||||||
|
if(config.onInit) {
|
||||||
|
config.onInit({
|
||||||
|
myID: wc.myID,
|
||||||
|
realtime: realtime,
|
||||||
|
getLag: network.getLag,
|
||||||
|
userList: userList,
|
||||||
|
|
||||||
|
// channel
|
||||||
|
channel: channel,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Sending a message...
|
// Sending a message...
|
||||||
realtime.onMessage(function(message) {
|
realtime.onMessage(function(message) {
|
||||||
// Filter messages sent by Chainpad to make it compatible with Netflux
|
// Filter messages sent by Chainpad to make it compatible with Netflux
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user