whalesong icon indicating copy to clipboard operation
whalesong copied to clipboard

pushName over whatsapp business

Open jesusvalverde opened this issue 5 years ago • 6 comments

Describe the bug Using update_pushname do not change the Pushname in a whatsapp business

await self._driver.conn.update_pushname(name=statusAndPic['phoneName'])

Additional context no problems over set_my_status

jesusvalverde avatar Mar 08 '19 01:03 jesusvalverde

I believe this might be caused due to api differences between normal whatsapp web and whatsaspp business . Have you tried debugging?

parthibd avatar Mar 25 '19 20:03 parthibd

what is statusAndPic['phoneName'] ? Update pushname only takes as single string

parthibd avatar Mar 25 '19 20:03 parthibd

This is the definition of updatepushname def update_pushname(self, name: str) -> Result[None]: . See it takes a string . Would you mind sharing the code thats causing you the trouble ?

parthibd avatar Mar 25 '19 20:03 parthibd

This is the Code... Build a Small backend to manage some bots utiliies

I get the statusAndPic['statusName'] and the statusAndPic['phoneName'] form and API, every hour, and of course the 2 var have data on it.

async def getStatusAndPic(self): PARAMS = urllib.parse.urlencode({'typo':'statusID', 'ip':self.myIp }) r=urllib.request.urlopen("https://api.xxxxx.com/phone.status.php?%s" % PARAMS) statusAndPic = json.loads(r.read())

     await self._driver.status.set_my_status(new_status=statusAndPic['statusName'])
     self.statusName=statusAndPic['statusName']

     await self._driver.conn.update_pushname(name=statusAndPic['phoneName'])
     self.phoneName=statusAndPic['phoneName']

    await asyncio.sleep(3660.0) #3660
    ensure_future(self.getStatusAndPic())

jesusvalverde avatar Mar 26 '19 02:03 jesusvalverde

What does statusAndPic['phoneName'] return ?

parthibd avatar Mar 26 '19 07:03 parthibd

It's a char variable

jesusvalverde avatar Mar 26 '19 16:03 jesusvalverde