🔖 Update to v1.2.12

This commit is contained in:
xtaodada 2022-09-15 16:25:33 +08:00
parent 7bdacf15f5
commit f90aecb5f3
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659
2 changed files with 6 additions and 3 deletions

View File

@ -13,7 +13,7 @@ from pagermaid.scheduler import scheduler
import pyromod.listen
from pyrogram import Client
pgm_version = "1.2.11"
pgm_version = "1.2.12"
CMD_LIST = {}
module_dir = __path__[0]
working_dir = getcwd()

View File

@ -66,7 +66,9 @@ class Mixpanel:
'$distinct_id': distinct_id,
'$set': properties,
}
record = {'$token': self._token, '$time': self._now()} | message
record = {'$token': self._token, '$time': self._now()}
# sourcery skip: dict-assign-update-to-union
record.update(message)
return await self.api_call('people', self.json_dumps(record, cls=self._serializer))
async def track(self, distinct_id: str, event_name: str, properties: dict):
@ -79,7 +81,8 @@ class Mixpanel:
'$lib_version': '4.10.0',
}
if properties:
all_properties |= properties
# sourcery skip: dict-assign-update-to-union
all_properties.update(properties)
event = {
'event': event_name,
'properties': all_properties,