File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -1128,15 +1128,13 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
11281128 const altServer = jidDecode ( alt ) ?. server
11291129 const primaryJid = msg . key . participant || msg . key . remoteJid !
11301130 if ( altServer === 'lid' ) {
1131- if ( typeof ( await signalRepository . lidMapping . getPNForLID ( alt ) ) === 'string' ) {
1131+ if ( ! ( await signalRepository . lidMapping . getPNForLID ( alt ) ) ) {
11321132 await signalRepository . lidMapping . storeLIDPNMappings ( [ { lid : alt , pn : primaryJid } ] )
11331133 await signalRepository . migrateSession ( primaryJid , alt )
11341134 }
11351135 } else {
1136- if ( typeof ( await signalRepository . lidMapping . getLIDForPN ( alt ) ) === 'string' ) {
1137- await signalRepository . lidMapping . storeLIDPNMappings ( [ { lid : primaryJid , pn : alt } ] )
1138- await signalRepository . migrateSession ( alt , primaryJid )
1139- }
1136+ await signalRepository . lidMapping . storeLIDPNMappings ( [ { lid : primaryJid , pn : alt } ] )
1137+ await signalRepository . migrateSession ( alt , primaryJid )
11401138 }
11411139 }
11421140
Original file line number Diff line number Diff line change @@ -13,15 +13,15 @@ import {
1313 isJidNewsletter ,
1414 isJidStatusBroadcast ,
1515 isLidUser ,
16- isPnUser ,
17- // transferDevice
16+ isPnUser
17+ // transferDevice
1818} from '../WABinary'
1919import { unpadRandomMax16 } from './generics'
2020import type { ILogger } from './logger'
2121import { decodeAndHydrate } from './proto-utils'
2222
2323const getDecryptionJid = async ( sender : string , repository : SignalRepositoryWithLIDStore ) : Promise < string > => {
24- if ( ! sender . includes ( '@s.whatsapp.net ' ) ) {
24+ if ( sender . includes ( '@lid ' ) ) {
2525 return sender
2626 }
2727
You can’t perform that action at this time.
0 commit comments