Support message separation for multiple inputs from same user. (#142)

This commit is contained in:
Savinda Senevirathne
2020-11-06 10:55:40 +05:30
committed by GitHub
parent 202a6a2715
commit 51173e37f2
11 changed files with 241 additions and 114 deletions

View File

@@ -18,10 +18,13 @@ hpc.events.on("user_message", (pubKey, message) => {
}
else {
user.sendOutput("Echoing: " + userInput);
user.closeChannel();
}
});
hpc.events.on("user_finished", (pubKey) => {
hpc.users[pubKey].closeChannel();
});
const npl = hpc.npl;
// Npl channel always connected if contract is not in readonly mode.