Skip to content

Commit dfb1ee0

Browse files
authored
Adjust to use the same jid
1 parent 3da73b8 commit dfb1ee0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/whatsapp/services/whatsapp.service.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3130,7 +3130,7 @@ export class WAStartupService {
31303130
const jids: {
31313131
groups: { number: string; jid: string }[];
31323132
broadcast: { number: string; jid: string }[];
3133-
users: { number: string; jid: string; contact?: string; name?: string }[];
3133+
users: { number: string; jid: string; name?: string }[];
31343134
} = {
31353135
groups: [],
31363136
broadcast: [],
@@ -3145,7 +3145,7 @@ export class WAStartupService {
31453145
} else if (jid === 'status@broadcast') {
31463146
jids.broadcast.push({ number, jid });
31473147
} else {
3148-
jids.users.push({ number, jid, contact: jid });
3148+
jids.users.push({ number, jid });
31493149
}
31503150
});
31513151

@@ -3181,7 +3181,7 @@ export class WAStartupService {
31813181
const query: ContactQuery = {
31823182
where: {
31833183
owner: this.instance.name,
3184-
id: user.contact,
3184+
id: user.jid.startsWith('+') ? user.jid.substring(1) : user.jid;,
31853185
},
31863186
};
31873187
const contacts: ContactRaw[] = await this.repository.contact.find(query);

0 commit comments

Comments
 (0)