yeref 0.29.58__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.
- {yeref-0.29.58 → yeref-0.29.60}/PKG-INFO +1 -1
- {yeref-0.29.58 → yeref-0.29.60}/setup.py +1 -1
- {yeref-0.29.58 → yeref-0.29.60}/yeref/yeref.py +15 -10
- {yeref-0.29.58 → yeref-0.29.60}/yeref.egg-info/PKG-INFO +1 -1
- {yeref-0.29.58 → yeref-0.29.60}/pyproject.toml +0 -0
- {yeref-0.29.58 → yeref-0.29.60}/setup.cfg +0 -0
- {yeref-0.29.58 → yeref-0.29.60}/yeref/__init__.py +0 -0
- {yeref-0.29.58 → yeref-0.29.60}/yeref/l_.py +0 -0
- {yeref-0.29.58 → yeref-0.29.60}/yeref/tonweb.js +0 -0
- {yeref-0.29.58 → yeref-0.29.60}/yeref.egg-info/SOURCES.txt +0 -0
- {yeref-0.29.58 → yeref-0.29.60}/yeref.egg-info/dependency_links.txt +0 -0
- {yeref-0.29.58 → yeref-0.29.60}/yeref.egg-info/top_level.txt +0 -0
@@ -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 "
|
2589
|
+
elif "GROUPP_CVOTERESTRICT FROM" in sql: pass
|
2590
2590
|
else:
|
2591
2591
|
logger.info(log_ % f"SQL: {sql}, PARAM: {param}")
|
2592
2592
|
else:
|
@@ -7800,7 +7800,7 @@ async def upd_user_data_main(data, web_app_init_data, BASE_P, BOT_TOKEN_E18B, re
|
|
7800
7800
|
if not USER_DT:
|
7801
7801
|
USER_DT = now_
|
7802
7802
|
USER_VARS['USER_DT'] = USER_DT.strftime("%d-%m-%Y_%H-%M-%S")
|
7803
|
-
USER_HID = hashlib.blake2b(f"{
|
7803
|
+
USER_HID = hashlib.blake2b(f"{chat_id}-{chat_id}".encode('utf-8'), digest_size=4).hexdigest()
|
7804
7804
|
if utm: USER_VARS['USER_UTM'] = utm
|
7805
7805
|
|
7806
7806
|
USER_LSTS["USER_DAU"] = list(set(USER_LSTS.get("USER_DAU", []) + [now_.strftime('%Y-%m-%d')]))
|
@@ -7959,9 +7959,10 @@ async def upd_user_data(ENT_TID, data, web_app_init_data, PROJECT_USERNAME, BASE
|
|
7959
7959
|
if not USER_DT:
|
7960
7960
|
USER_DT = now_
|
7961
7961
|
USER_VARS['USER_DT'] = USER_DT.strftime("%d-%m-%Y_%H-%M-%S")
|
7962
|
-
USER_HID = hashlib.blake2b(f"{
|
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
7966
|
|
7966
7967
|
print(f"out {USER_VARS=}")
|
7967
7968
|
USER_LSTS["USER_DAU"] = list(set(USER_LSTS.get("USER_DAU", []) + [now_.strftime('%Y-%m-%d')]))
|
@@ -8365,9 +8366,6 @@ async def pay_handler_for_all(bot, message, ideas_en, ideas_ru, PROJECT_USERNAME
|
|
8365
8366
|
sql = "SELECT USER_TID, USER_VARS, USER_LSTS FROM \"USER\" WHERE USER_TID=$1"
|
8366
8367
|
data_usr = await db_select_pg(sql, (chat_id,), BASE_P)
|
8367
8368
|
if not len(data_usr):
|
8368
|
-
dt_ = datetime.now(timezone.utc).strftime('%d-%m-%Y_%H-%M-%S')
|
8369
|
-
sql = "INSERT INTO \"USER\" (USER_TID) VALUES ($1) ON CONFLICT DO NOTHING"
|
8370
|
-
await db_change_pg(sql, (chat_id,), BASE_P)
|
8371
8369
|
USER_LSTS = json.loads(USER_LSTS_)
|
8372
8370
|
USER_VARS = json.loads(USER_VARS_)
|
8373
8371
|
if payload == 'gift': USER_VARS['USER_UTM'] = 'gift'
|
@@ -8438,8 +8436,14 @@ async def pay_handler_for_all(bot, message, ideas_en, ideas_ru, PROJECT_USERNAME
|
|
8438
8436
|
USER_LSTS = json.dumps(USER_LSTS, ensure_ascii=False)
|
8439
8437
|
USER_VARS = json.dumps(USER_VARS, ensure_ascii=False)
|
8440
8438
|
|
8441
|
-
sql =
|
8442
|
-
|
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)
|
8443
8447
|
|
8444
8448
|
# , {payload_txt}
|
8445
8449
|
text = f"{l_payment_success[lz]} ★{total_amount}\n\n♥️ @{PROJECT_USERNAME} {l_payment_hashtag[lz]}"
|
@@ -13764,6 +13768,7 @@ async def bots_by_inline(chat_id, message, BASE_P):
|
|
13764
13768
|
async def get_buttons_main(lz, bot_un, BASE_P):
|
13765
13769
|
result = []
|
13766
13770
|
try:
|
13771
|
+
# url_usr = f"tg://user?id={my_tid}" if random.choice([True, False]) else 'https://t.me/ferey_support?text=hi'
|
13767
13772
|
url_usr = f"tg://user?id={my_tid}" if random.choice([True, False]) else 'https://t.me/ferey_support?text=hi'
|
13768
13773
|
# url_share = f"https://t.me/FereySupportBot?profile"
|
13769
13774
|
if random.choice([True, False]):
|
@@ -14264,8 +14269,8 @@ async def lz_code_pg(chat_id, lan, BASE_P):
|
|
14264
14269
|
elif lan in ['ru', 'kz', 'kg', 'uz', 'tm', 'md', 'am', 'uk-UA', 'uk', 'kk', 'tk', 'ky']:
|
14265
14270
|
result = 'ru'
|
14266
14271
|
|
14267
|
-
sql = "UPDATE \"USER\" SET USER_LZ=$1 WHERE USER_TID=$2"
|
14268
|
-
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)
|
14269
14274
|
else:
|
14270
14275
|
result = data[0][0]
|
14271
14276
|
except Exception as e:
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|