(args: [DataPrefix, string, string, any])
| 316 | } |
| 317 | |
| 318 | private async _handleHSet(args: [DataPrefix, string, string, any]) { |
| 319 | const [prefix, suffix, field] = args; |
| 320 | |
| 321 | if ( |
| 322 | !(await (dataHashes[prefix] as DataHash)?.fields[field]?.userSettable?.({ |
| 323 | dataAbstraction: dataAbstraction(), |
| 324 | userId: this.userId, |
| 325 | suffix, |
| 326 | })) |
| 327 | ) { |
| 328 | return; |
| 329 | } |
| 330 | |
| 331 | const resolvable = new Resolvable(); |
| 332 | |
| 333 | this._hSetBuffer.push([...args, resolvable]); |
| 334 | |
| 335 | if (this._hSetBuffer.length === 1) { |
| 336 | setTimeout(() => this._flushHSetBuffer()); |
| 337 | } |
| 338 | |
| 339 | return await resolvable; |
| 340 | } |
| 341 | private async _flushHSetBuffer() { |
| 342 | if (this._hSetBuffer.length === 0) { |
| 343 | return; |
no test coverage detected