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

Method unreadComment

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

Source from the content-addressed store, hash-verified

1379 }
1380
1381 public static async unreadComment({ userId, commentId }) {
1382 if (!userId || !commentId) {
1383 throw new Error('Bad data.');
1384 }
1385
1386 await this.updateOne(
1387 { _id: userId },
1388 {
1389 $push: {
1390 unreadCommentIds: commentId,
1391 },
1392 },
1393 );
1394 }
1395
1396 // marks one Comment as unread for participants of Discussion
1397 public static async markCommentAsUnreadForParticipantsOfDiscussionAfterCommentIsAdded({

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected