Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2372,7 +2372,7 @@ export class BaileysStartupService extends ChannelStartupService {
throw new NotFoundException('Group not found');
}

if (options?.mentionsEveryOne) {
if (options?.mentionsEveryOne === true) {
mentions = group.participants.map((participant) => participant.id);
} else if (options?.mentioned?.length) {
mentions = options.mentioned.map((mention) => {
Expand Down
18 changes: 9 additions & 9 deletions src/validate/message.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const textMessageSchema: JSONSchema7 = {
description: 'Enter a value in milliseconds',
},
quoted: { ...quotedOptionsSchema },
everyOne: { type: 'boolean', enum: [true, false] },
mentionsEveryOne: { type: 'boolean', enum: [true, false] },
mentioned: {
type: 'array',
minItems: 1,
Expand Down Expand Up @@ -107,7 +107,7 @@ export const mediaMessageSchema: JSONSchema7 = {
description: 'Enter a value in milliseconds',
},
quoted: { ...quotedOptionsSchema },
everyOne: { type: 'boolean', enum: [true, false] },
mentionsEveryOne: { type: 'boolean', enum: [true, false] },
mentioned: {
type: 'array',
minItems: 1,
Expand All @@ -133,7 +133,7 @@ export const ptvMessageSchema: JSONSchema7 = {
description: 'Enter a value in milliseconds',
},
quoted: { ...quotedOptionsSchema },
everyOne: { type: 'boolean', enum: [true, false] },
mentionsEveryOne: { type: 'boolean', enum: [true, false] },
mentioned: {
type: 'array',
minItems: 1,
Expand All @@ -159,7 +159,7 @@ export const audioMessageSchema: JSONSchema7 = {
description: 'Enter a value in milliseconds',
},
quoted: { ...quotedOptionsSchema },
everyOne: { type: 'boolean', enum: [true, false] },
mentionsEveryOne: { type: 'boolean', enum: [true, false] },
mentioned: {
type: 'array',
minItems: 1,
Expand Down Expand Up @@ -209,7 +209,7 @@ export const stickerMessageSchema: JSONSchema7 = {
description: 'Enter a value in milliseconds',
},
quoted: { ...quotedOptionsSchema },
everyOne: { type: 'boolean', enum: [true, false] },
mentionsEveryOne: { type: 'boolean', enum: [true, false] },
mentioned: {
type: 'array',
minItems: 1,
Expand Down Expand Up @@ -238,7 +238,7 @@ export const locationMessageSchema: JSONSchema7 = {
description: 'Enter a value in milliseconds',
},
quoted: { ...quotedOptionsSchema },
everyOne: { type: 'boolean', enum: [true, false] },
mentionsEveryOne: { type: 'boolean', enum: [true, false] },
mentioned: {
type: 'array',
minItems: 1,
Expand Down Expand Up @@ -325,7 +325,7 @@ export const pollMessageSchema: JSONSchema7 = {
description: 'Enter a value in milliseconds',
},
quoted: { ...quotedOptionsSchema },
everyOne: { type: 'boolean', enum: [true, false] },
mentionsEveryOne: { type: 'boolean', enum: [true, false] },
mentioned: {
type: 'array',
minItems: 1,
Expand Down Expand Up @@ -382,7 +382,7 @@ export const listMessageSchema: JSONSchema7 = {
description: 'Enter a value in milliseconds',
},
quoted: { ...quotedOptionsSchema },
everyOne: { type: 'boolean', enum: [true, false] },
mentionsEveryOne: { type: 'boolean', enum: [true, false] },
mentioned: {
type: 'array',
minItems: 1,
Expand Down Expand Up @@ -433,7 +433,7 @@ export const buttonsMessageSchema: JSONSchema7 = {
description: 'Enter a value in milliseconds',
},
quoted: { ...quotedOptionsSchema },
everyOne: { type: 'boolean', enum: [true, false] },
mentionsEveryOne: { type: 'boolean', enum: [true, false] },
mentioned: {
type: 'array',
minItems: 1,
Expand Down