File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -852,22 +852,21 @@ export const makeChatsSocket = (config: SocketConfig) => {
852852 }
853853 }
854854
855- /** sending non-abt props may fix QR scan fail if server expects */
855+ /** fetch AB props */
856856 const fetchProps = async ( ) => {
857- //TODO: implement both protocol 1 and protocol 2 prop fetching, specially for abKey for WM
858857 const resultNode = await query ( {
859858 tag : 'iq' ,
860859 attrs : {
861860 to : S_WHATSAPP_NET ,
862- xmlns : 'w ' ,
861+ xmlns : 'abt ' ,
863862 type : 'get'
864863 } ,
865864 content : [
866865 {
867866 tag : 'props' ,
868867 attrs : {
869- protocol : '2 ' ,
870- hash : authState ? .creds ? .lastPropHash || ''
868+ protocol : '1 ' ,
869+ ... ( authState ?. creds ?. lastPropHash ? { hash : authState . creds . lastPropHash } : { } )
871870 }
872871 }
873872 ]
You can’t perform that action at this time.
0 commit comments