whalesong
whalesong copied to clipboard
pushName over whatsapp business
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
I believe this might be caused due to api differences between normal whatsapp web and whatsaspp business . Have you tried debugging?
what is statusAndPic['phoneName']
? Update pushname only takes as single string
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 ?
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())
What does statusAndPic['phoneName']
return ?
It's a char variable