Skip to content

Commit

Permalink
fix logs
Browse files Browse the repository at this point in the history
  • Loading branch information
clairton committed Nov 15, 2023
1 parent 1579a6f commit e9e310f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/services/client_baileys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,11 @@ export class ClientBaileys implements Client {
const currentStatus = await this.store?.dataStore?.loadStatus(payload?.message_id)
if (currentStatus != status) {
const key = await this.store?.dataStore?.loadKey(payload?.message_id)
logger.debug('key %s for %s', key, payload?.message_id)
logger.debug('key %s for %s', JSON.stringify(key), payload?.message_id)
if (key) {
logger.debug('Baileys reading message key %s...', key)
logger.debug('Baileys reading message key %s...', JSON.stringify(key))
await this.readMessages([key])
logger.debug('Baileys read message key %s!', key)
logger.debug('Baileys read message key %s!', JSON.stringify(key))
}
} else {
logger.debug('Baileys already read message id %s!', payload?.message_id)
Expand Down
2 changes: 1 addition & 1 deletion src/services/media_store_file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export const mediaStoreFile = (phone: string, config: Config, getDataStore: getD
let fileName = ''
if (mediaId) {
const key: proto.IMessageKey | undefined = await store.loadKey(mediaId)
logger.debug('key %s for %s', key, mediaId)
logger.debug('key %s for %s', JSON.stringify(key), mediaId)
if (key) {
const { remoteJid, id } = key
if (remoteJid && id) {
Expand Down
2 changes: 1 addition & 1 deletion src/services/media_store_s3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export const mediaStoreS3 = (phone: string, config: Config, getDataStore: getDat
const mediaId = file.split('.')[0]
if (mediaId) {
const key: proto.IMessageKey | undefined = await store.loadKey(mediaId)
logger.debug('key %s for %s', key, mediaId)
logger.debug('key %s for %s', JSON.stringify(key), mediaId)
if (key) {
const { remoteJid, id } = key
if (remoteJid && id) {
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3044,7 +3044,7 @@ cfb@~1.2.1:
adler-32 "~1.3.0"
crc-32 "~1.2.0"

chalk@^2.0.0:
chalk@^2.0.0, chalk@^2.4.2:
version "2.4.2"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
Expand Down

0 comments on commit e9e310f

Please sign in to comment.