MCPcopy Create free account
hub / github.com/async-labs/async / readComment

Method readComment

api/server/models/User.ts:1366–1379  ·  view source on GitHub ↗
({ userId, commentId })

Source from the content-addressed store, hash-verified

1364 }
1365
1366 public static async readComment({ userId, commentId }) {
1367 if (!userId || !commentId) {
1368 throw new Error('Bad data.');
1369 }
1370
1371 await this.updateOne(
1372 { _id: userId },
1373 {
1374 $pull: {
1375 unreadCommentIds: commentId,
1376 },
1377 },
1378 );
1379 }
1380
1381 public static async unreadComment({ userId, commentId }) {
1382 if (!userId || !commentId) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected