This commit is contained in:
Wolfgang Huß 2023-07-25 16:24:42 +02:00
parent 3a2f8b3bb5
commit 23e637e098
2 changed files with 0 additions and 3 deletions

View File

@ -25,7 +25,6 @@ export const queryAllUserIds = async (context, offset = -1, pageSize = -1) => {
export const extractMentionedUsers = async (content?) => {
if (!content) return []
console.log('extractMentionedUsers content: ', content)
const $ = cheerio.load(content)
const userIds = $('a.mention[data-mention-id]')
.map((_, el) => {
@ -35,6 +34,5 @@ export const extractMentionedUsers = async (content?) => {
.map((id) => id.trim())
.filter((id) => !!id)
.filter((id, index, allIds) => allIds.indexOf(id) === index)
console.log('extractMentionedUsers userIds: ', userIds)
return userIds
}

View File

@ -62,7 +62,6 @@ const notifyPublishUsersOfMentionInclAll = async (label, id, idsOfUsers, reason,
let pageOfUserIds = await queryAllUserIds(context, offset, pageSize)
while (pageOfUserIds.length > 0) {
console.log('handleContentDataOfPost on @all idsOfUsers: ', pageOfUserIds)
await publishNotifications(context, [
notifyUsersOfMention(label, id, pageOfUserIds, reason, context),
])