mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2026-01-19 11:21:26 +00:00
Cleanup
This commit is contained in:
parent
3a2f8b3bb5
commit
23e637e098
@ -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
|
||||
}
|
||||
|
||||
@ -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),
|
||||
])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user