remove use of deprecated 'new Buffer' instanciation

This commit is contained in:
ansuz
2020-01-06 14:29:45 -05:00
parent 32bdfacd92
commit 4aaef2d811
4 changed files with 4 additions and 4 deletions

View File

@@ -284,7 +284,7 @@ module.exports.create = function (cfg) {
const storeMessage = function (ctx, channel, msg, isCp, optionalMessageHash) {
const id = channel.id;
const msgBin = new Buffer(msg + '\n', 'utf8');
const msgBin = Buffer.from(msg + '\n', 'utf8');
queueStorage(id, function (next) {
// Store the message first, and update the index only once it's stored.