Skip to content

Commit

Permalink
fixed bug when send name without result
Browse files Browse the repository at this point in the history
  • Loading branch information
itamarshubin committed Mar 18, 2024
1 parent ae236f0 commit 918edf0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/constants/subscription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export const createAlertSubscription = async (msg: Message) => {
const matches = users.filter((user) =>
user.data().name?.includes(msg.body)
);
if (!matches) {
if (!matches.length) {
return client.sendMessage(
msg.from,
"לא נמצא משתמש עם שם כזה, הזן שם אחר או 'בטל' כדי להפסיק את הפעולה"
Expand Down

0 comments on commit 918edf0

Please sign in to comment.