Skip to content

Commit 32e6ecb

Browse files
committed
fix: add option to select specific fields on find message repository
1 parent 901954d commit 32e6ecb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/whatsapp/repository/message.repository.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ export class MessageRepository extends Repository {
118118

119119
return await this.messageModel
120120
.find({ ...query.where })
121+
.select(query.select || {})
121122
.sort({ messageTimestamp: -1 })
122123
.limit(query?.limit ?? 0);
123124
}

0 commit comments

Comments
 (0)