yeref 0.29.59__tar.gz → 0.29.60__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: yeref
3
- Version: 0.29.59
3
+ Version: 0.29.60
4
4
  Summary: desc-f
5
5
  Author: john smith
6
6
  Dynamic: author
@@ -2,7 +2,7 @@ from setuptools import setup
2
2
 
3
3
  setup(
4
4
  name='yeref',
5
- version='0.29.59',
5
+ version='0.29.60',
6
6
  description='desc-f',
7
7
  author='john smith',
8
8
  packages=['yeref'],
@@ -2586,7 +2586,7 @@ async def db_select_pg(sql, param=None, db_pool=None, db_config=None):
2586
2586
  elif "SELECT NOTICE_ID, NOTICE_TYPE, NOTICE_TXT" in sql: pass
2587
2587
  elif "<= NOW()" in sql: pass
2588
2588
  elif "_LZ FROM" in sql: pass
2589
- elif "GROUPP_CWORKPERMISSIONS FROM" in sql: pass
2589
+ elif "GROUPP_CVOTERESTRICT FROM" in sql: pass
2590
2590
  else:
2591
2591
  logger.info(log_ % f"SQL: {sql}, PARAM: {param}")
2592
2592
  else:
@@ -7962,7 +7962,7 @@ async def upd_user_data(ENT_TID, data, web_app_init_data, PROJECT_USERNAME, BASE
7962
7962
  USER_HID = hashlib.blake2b(f"{tid}-{chat_id}".encode('utf-8'), digest_size=4).hexdigest()
7963
7963
  if req_url: USER_VARS['USER_UTM'] = req_url
7964
7964
  if not USER_HID: USER_HID = hashlib.blake2b(f"{tid}-{chat_id}".encode('utf-8'), digest_size=4).hexdigest()
7965
- USER_HID = hashlib.blake2b(f"{tid}-{chat_id}".encode('utf-8'), digest_size=4).hexdigest()
7965
+ # USER_HID = hashlib.blake2b(f"{tid}-{chat_id}".encode('utf-8'), digest_size=4).hexdigest()
7966
7966
 
7967
7967
  print(f"out {USER_VARS=}")
7968
7968
  USER_LSTS["USER_DAU"] = list(set(USER_LSTS.get("USER_DAU", []) + [now_.strftime('%Y-%m-%d')]))
@@ -8366,9 +8366,6 @@ async def pay_handler_for_all(bot, message, ideas_en, ideas_ru, PROJECT_USERNAME
8366
8366
  sql = "SELECT USER_TID, USER_VARS, USER_LSTS FROM \"USER\" WHERE USER_TID=$1"
8367
8367
  data_usr = await db_select_pg(sql, (chat_id,), BASE_P)
8368
8368
  if not len(data_usr):
8369
- dt_ = datetime.now(timezone.utc).strftime('%d-%m-%Y_%H-%M-%S')
8370
- sql = "INSERT INTO \"USER\" (USER_TID) VALUES ($1) ON CONFLICT DO NOTHING"
8371
- await db_change_pg(sql, (chat_id,), BASE_P)
8372
8369
  USER_LSTS = json.loads(USER_LSTS_)
8373
8370
  USER_VARS = json.loads(USER_VARS_)
8374
8371
  if payload == 'gift': USER_VARS['USER_UTM'] = 'gift'
@@ -8439,8 +8436,14 @@ async def pay_handler_for_all(bot, message, ideas_en, ideas_ru, PROJECT_USERNAME
8439
8436
  USER_LSTS = json.dumps(USER_LSTS, ensure_ascii=False)
8440
8437
  USER_VARS = json.dumps(USER_VARS, ensure_ascii=False)
8441
8438
 
8442
- sql = f"UPDATE \"USER\" SET USER_VARS=$1, USER_LSTS=$2 WHERE USER_TID=$3"
8443
- await db_change_pg(sql, (USER_VARS, USER_LSTS, chat_id,), BASE_P)
8439
+ sql = """
8440
+ INSERT INTO "USER" (USER_TID, USER_VARS, USER_LSTS)
8441
+ VALUES ($1, $2, $3)
8442
+ ON CONFLICT (USER_TID) DO UPDATE
8443
+ SET USER_VARS = EXCLUDED.USER_VARS,
8444
+ USER_LSTS = EXCLUDED.USER_LSTS
8445
+ """
8446
+ await db_change_pg(sql, (chat_id, USER_VARS, USER_LSTS,), BASE_P)
8444
8447
 
8445
8448
  # , {payload_txt}
8446
8449
  text = f"{l_payment_success[lz]} ★{total_amount}\n\n♥️ @{PROJECT_USERNAME} {l_payment_hashtag[lz]}"
@@ -13765,6 +13768,7 @@ async def bots_by_inline(chat_id, message, BASE_P):
13765
13768
  async def get_buttons_main(lz, bot_un, BASE_P):
13766
13769
  result = []
13767
13770
  try:
13771
+ # url_usr = f"tg://user?id={my_tid}" if random.choice([True, False]) else 'https://t.me/ferey_support?text=hi'
13768
13772
  url_usr = f"tg://user?id={my_tid}" if random.choice([True, False]) else 'https://t.me/ferey_support?text=hi'
13769
13773
  # url_share = f"https://t.me/FereySupportBot?profile"
13770
13774
  if random.choice([True, False]):
@@ -14265,8 +14269,8 @@ async def lz_code_pg(chat_id, lan, BASE_P):
14265
14269
  elif lan in ['ru', 'kz', 'kg', 'uz', 'tm', 'md', 'am', 'uk-UA', 'uk', 'kk', 'tk', 'ky']:
14266
14270
  result = 'ru'
14267
14271
 
14268
- sql = "UPDATE \"USER\" SET USER_LZ=$1 WHERE USER_TID=$2"
14269
- await db_change_pg(sql, (result, chat_id,), BASE_P)
14272
+ # sql = "UPDATE \"USER\" SET USER_LZ=$1 WHERE USER_TID=$2"
14273
+ # await db_change_pg(sql, (result, chat_id,), BASE_P)
14270
14274
  else:
14271
14275
  result = data[0][0]
14272
14276
  except Exception as e:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: yeref
3
- Version: 0.29.59
3
+ Version: 0.29.60
4
4
  Summary: desc-f
5
5
  Author: john smith
6
6
  Dynamic: author
File without changes
File without changes
File without changes
File without changes
File without changes