Skip to content
Snippets Groups Projects
Commit e6912176 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[enh] duniter/duniter#1146 HEAD messages refreshment hide member's UID

parent 5fb36471
No related branches found
No related tags found
No related merge requests found
......@@ -155,7 +155,12 @@ module.exports = {
co(function*() {
if (data.ws2p === 'heads') {
for (const head of data.added) {
const member = yield server.dal.getWrittenIdtyByPubkey(head.message.split(':')[2])
let posPubkey = 3;
// Gestion de l'ancien format
if (!head.message.match(/:1:/)) {
posPubkey = 2;
}
const member = yield server.dal.getWrittenIdtyByPubkey(head.message.split(':')[posPubkey])
head.uid = member && member.uid || ''
}
wssEvents.broadcast(JSON.stringify({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment