Use the new AttributeMap and Changeset APIs

This commit is contained in:
Richard Hansen 2021-11-28 23:39:15 -05:00
parent f00b1ae89b
commit a02e45499d
3 changed files with 6 additions and 31 deletions

View file

@ -117,9 +117,7 @@ const loadBroadcastJS = (socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro
getActiveAuthors() {
const authorIds = new Set();
for (const aline of this.alines) {
const opIter = Changeset.opIterator(aline);
while (opIter.hasNext()) {
const op = opIter.next();
for (const op of Changeset.deserializeOps(aline)) {
for (const [k, v] of attributes.attribsFromString(op.attribs, this.apool)) {
if (k !== 'author') continue;
if (v) authorIds.add(v);