Filters the mentioned ids down to the users that may be mentioned — typically the members of tenantId. Ids it drops are neither stored nor notified.
Without it every @id in the body is taken at face value, so a mention can address a user of another tenant: wire it whenever comment:mentioned reaches a real notification channel.
basalt / comments/src / CommentsOptions
Interface: CommentsOptions
Defined in: comments/src/comments.ts:95
Properties
hooks?
>
optionalhooks?:HookBusDefined in: comments/src/comments.ts:97
maxBodyLength?
>
optionalmaxBodyLength?:numberDefined in: comments/src/comments.ts:101
Longest body accepted, in characters. Default DEFAULT_MAX_COMMENT_LENGTH.
maxMentions?
>
optionalmaxMentions?:numberDefined in: comments/src/comments.ts:106
Most distinct
@mentionsone comment may carry — each one emits acomment:mentionedhook (a notification). Default DEFAULT_MAX_MENTIONS.mentionPattern?
>
optionalmentionPattern?:RegExpDefined in: comments/src/comments.ts:99
Regex whose first capture group is a mentioned user id. Default
@([\w-]+).now?
>
optionalnow?: () =>numberDefined in: comments/src/comments.ts:116
Returns
numberresolveMentions?
>
optionalresolveMentions?: (ids,tenantId) =>string[] |Promise<string[]>Defined in: comments/src/comments.ts:115
Filters the mentioned ids down to the users that may be mentioned — typically the members of
tenantId. Ids it drops are neither stored nor notified.Without it every
@idin the body is taken at face value, so a mention can address a user of another tenant: wire it whenevercomment:mentionedreaches a real notification channel.Parameters
ids
string[]tenantId
stringReturns
string[] |Promise<string[]>store?
>
optionalstore?:CommentStoreDefined in: comments/src/comments.ts:96