MCPcopy Create free account
hub / github.com/PrismarineJS/node-minecraft-protocol / setPreviouslyAcknowledged

Method setPreviouslyAcknowledged

src/server/chat.js:266–268  ·  view source on GitHub ↗
(lastSeen, lastRejected = {})

Source from the content-addressed store, hash-verified

264 // we need to store it in memory to allow those entries to be approved again without
265 // erroring about a message we never sent in the next serverbound message packet we get.
266 setPreviouslyAcknowledged (lastSeen, lastRejected = {}) {
267 this.lastSeen = lastSeen.map(e => Object.values(e)).push(Object.values(lastRejected))
268 }
269
270 previouslyAcknowledged (sender, signature) {
271 return this.lastSeen.some(([a, b]) => a === sender && b === signature)

Callers 1

validateLastMessagesFunction · 0.80

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected