User input json/bson format improvements. (#174)

* Removed hex encoding in json input container.
* Refactored client lib exports.
This commit is contained in:
Ravin Perera
2020-11-28 21:24:35 +05:30
committed by GitHub
parent 79b55258de
commit 332e5a4750
8 changed files with 345 additions and 334 deletions

View File

@@ -15,14 +15,14 @@ const echoContract = async (ctx) => {
// This user's pubkey can be accessed from 'user.pubKey'
// A reply message can be sent to the user by 'user.send(msg)'
const msg = buf.toString("utf8");
const msg = buf.toString();
if (msg == "ts") {
await user.send(fs.readFileSync("exects.txt"));
}
else {
await user.send("Echoing: " + msg);
}
});
});
// Get list of all users who are connected.
// ctx.users.get();