yeref 0.25.8__py3-none-any.whl → 0.25.9__py3-none-any.whl
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/yeref.py
CHANGED
@@ -16996,6 +16996,7 @@ async def post_pub(bot, lz, chat_id, ENT_TID, post, MEDIA_D, BASE_S, BASE_D, PRO
|
|
16996
16996
|
cur_ = 1
|
16997
16997
|
len_ = 1
|
16998
16998
|
index = 0
|
16999
|
+
tid = str(ENT_TID).replace('-', '')
|
16999
17000
|
POST_MEDIA = json.loads(POST_MEDIA)
|
17000
17001
|
POST_BUTTONS = json.loads(POST_BUTTONS)
|
17001
17002
|
POST_CHKBOX = json.loads(POST_CHKBOX)
|
@@ -17033,7 +17034,7 @@ async def post_pub(bot, lz, chat_id, ENT_TID, post, MEDIA_D, BASE_S, BASE_D, PRO
|
|
17033
17034
|
# region txt
|
17034
17035
|
POST_TEXT = await correct_txt_tags_for_tg(POST_TEXT)
|
17035
17036
|
if POST_ISTAG and POST_TEXT and len(POST_TEXT) < 900:
|
17036
|
-
sql = f"SELECT USER_TID FROM {schema_name}_{
|
17037
|
+
sql = f"SELECT USER_TID FROM {schema_name}_{tid}.USER"
|
17037
17038
|
data_rnd = await db_select_pg(sql, (), BASE_D)
|
17038
17039
|
if len(data_rnd):
|
17039
17040
|
data_rnd = [it[0] for it in data_rnd]
|
@@ -17060,7 +17061,7 @@ async def post_pub(bot, lz, chat_id, ENT_TID, post, MEDIA_D, BASE_S, BASE_D, PRO
|
|
17060
17061
|
reply_markup=reply_markup.as_markup())
|
17061
17062
|
|
17062
17063
|
if PROJECT_USERNAME in ['FereyChannelBot', 'FereyGroupBot'] and not is_private:
|
17063
|
-
sql = f"UPDATE {schema_name}_{
|
17064
|
+
sql = f"UPDATE {schema_name}_{tid}.POST SET POST_MSGID=$1 WHERE POST_TID=$2"
|
17064
17065
|
await db_change_pg(sql, (result.message_id, POST_TID,), BASE_D)
|
17065
17066
|
return
|
17066
17067
|
# endregion
|
@@ -17173,6 +17174,10 @@ async def post_pub(bot, lz, chat_id, ENT_TID, post, MEDIA_D, BASE_S, BASE_D, PRO
|
|
17173
17174
|
reply_markup=reply_markup.as_markup())
|
17174
17175
|
elif POST_TYPE == 'photo':
|
17175
17176
|
print(f"here {POST_MEDIA=}")
|
17177
|
+
POST_ID_, POST_TID_, POST_MSGID_, POST_CHATTID_, POST_USERTID_, POST_USERTUN_, \
|
17178
|
+
POST_TARGETTYPE_, POST_TARGET_, POST_TYPE_, POST_TEXT_, POST_MEDIA_, POST_BUTTONS_, \
|
17179
|
+
POST_CHKBOX_, POST_WEB_, POST_NFT_, POST_PAY_, POST_INVOICE_, POST_BLOG_, POST_ISMINTED_, \
|
17180
|
+
POST_MINTLINK_, POST_ISPRIVATE_, POST_TZ_, POST_DT_, POST_TR_, POST_STATUS_ = post
|
17176
17181
|
|
17177
17182
|
file_id = POST_MEDIA[index]['file_id']
|
17178
17183
|
print(f"before {file_id=}, {POST_ISWATER=}, {POST_WATER=}")
|
@@ -17206,7 +17211,7 @@ async def post_pub(bot, lz, chat_id, ENT_TID, post, MEDIA_D, BASE_S, BASE_D, PRO
|
|
17206
17211
|
POST_MEDIA_COPY[index]['filew_id'] = file_id
|
17207
17212
|
print(f"sooo {POST_MEDIA_COPY=}")
|
17208
17213
|
|
17209
|
-
sql = f"UPDATE {schema_name}_{
|
17214
|
+
sql = f"UPDATE {schema_name}_{tid}.POST SET POST_MEDIA=$1 WHERE POST_TID=$2"
|
17210
17215
|
await db_change_pg(sql, (
|
17211
17216
|
json.dumps(POST_MEDIA_COPY, ensure_ascii=False),
|
17212
17217
|
POST_TID,
|
@@ -17217,16 +17222,34 @@ async def post_pub(bot, lz, chat_id, ENT_TID, post, MEDIA_D, BASE_S, BASE_D, PRO
|
|
17217
17222
|
await extra_bot.session.close()
|
17218
17223
|
else:
|
17219
17224
|
file_id = POST_MEDIA[index]['filew_id']
|
17225
|
+
elif index == 0 and POST_MEDIA[index]['file_link'] not in [photo_jpg] and len(POST_TEXT_) > 1024:
|
17226
|
+
POST_TEXT_ = await correct_txt_tags_for_tg(POST_TEXT_)
|
17227
|
+
print(f"{POST_TEXT_=}")
|
17228
|
+
|
17229
|
+
result = await bot.send_message(chat_id=chat_id, text=POST_TEXT_, parse_mode=ParseMode.HTML,
|
17230
|
+
link_preview_options=LinkPreviewOptions(
|
17231
|
+
is_disabled=False,
|
17232
|
+
url=POST_MEDIA[index]['file_link'],
|
17233
|
+
prefer_large_media=True,
|
17234
|
+
show_above_text=POST_CHKBOX['POST_ISPREVIEW']
|
17235
|
+
),
|
17236
|
+
disable_notification=not POST_CHKBOX['POST_ISSOUND'],
|
17237
|
+
protect_content=POST_CHKBOX['POST_ISPROTECT'],
|
17238
|
+
disable_web_page_preview=False,
|
17239
|
+
message_effect_id=POST_CHKBOX['POST_EFFECT'],
|
17240
|
+
reply_markup=reply_markup.as_markup())
|
17220
17241
|
|
17221
|
-
|
17222
|
-
|
17223
|
-
|
17224
|
-
|
17225
|
-
|
17226
|
-
|
17227
|
-
|
17228
|
-
|
17229
|
-
|
17242
|
+
|
17243
|
+
if not result:
|
17244
|
+
print(f"after {file_id=}")
|
17245
|
+
result = await bot.send_photo(chat_id=chat_id, photo=file_id, caption=POST_TEXT,
|
17246
|
+
parse_mode=ParseMode.HTML,
|
17247
|
+
show_caption_above_media=POST_CHKBOX['POST_ISPREVIEW'],
|
17248
|
+
has_spoiler=POST_CHKBOX['POST_ISSPOILER'],
|
17249
|
+
disable_notification=not POST_CHKBOX['POST_ISSOUND'],
|
17250
|
+
protect_content=POST_CHKBOX['POST_ISPROTECT'],
|
17251
|
+
message_effect_id=POST_CHKBOX['POST_EFFECT'],
|
17252
|
+
reply_markup=reply_markup.as_markup())
|
17230
17253
|
elif POST_TYPE in ['animation', 'gif']:
|
17231
17254
|
print(f"sova")
|
17232
17255
|
try:
|
@@ -17363,7 +17386,7 @@ async def post_pub(bot, lz, chat_id, ENT_TID, post, MEDIA_D, BASE_S, BASE_D, PRO
|
|
17363
17386
|
else:
|
17364
17387
|
POST_MSGID = str(result.message_id)
|
17365
17388
|
print(f'res: POST_MSGID = {POST_MSGID}')
|
17366
|
-
sql = f"UPDATE {schema_name}_{
|
17389
|
+
sql = f"UPDATE {schema_name}_{tid}.POST SET POST_MSGID=$1 WHERE POST_TID=$2"
|
17367
17390
|
await db_change_pg(sql, (POST_MSGID, POST_TID,), BASE_D)
|
17368
17391
|
# endregion
|
17369
17392
|
|
@@ -0,0 +1,8 @@
|
|
1
|
+
yeref/__init__.py,sha256=Qpv3o6Xa78VdLcsSRmctGtpnYE9btpAkCekgGhgJyXM,49
|
2
|
+
yeref/l_.py,sha256=qrGVTeCN6tReyOsv-AJfLX9bm9lSFbqXgQcFs3SUo7Y,1175162
|
3
|
+
yeref/tonweb.js,sha256=Jf6aFOQ1OIY4q7fINYz-m5LsI3seMus124M5SYYZmtE,443659
|
4
|
+
yeref/yeref.py,sha256=U8OhQOWuWoho_WL7VQT7-nvbFF0cY0d4PDGXlACinxk,1058023
|
5
|
+
yeref-0.25.9.dist-info/METADATA,sha256=8JMiv7vaXmL5765rOjFP3BPcoMa-8kNc3OhpV7Cgm9Y,118
|
6
|
+
yeref-0.25.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
7
|
+
yeref-0.25.9.dist-info/top_level.txt,sha256=yCQKchWHbfV-3OuQPYRdi2loypD-nmbDJbtt3OuKKkY,6
|
8
|
+
yeref-0.25.9.dist-info/RECORD,,
|
yeref-0.25.8.dist-info/RECORD
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
yeref/__init__.py,sha256=Qpv3o6Xa78VdLcsSRmctGtpnYE9btpAkCekgGhgJyXM,49
|
2
|
-
yeref/l_.py,sha256=qrGVTeCN6tReyOsv-AJfLX9bm9lSFbqXgQcFs3SUo7Y,1175162
|
3
|
-
yeref/tonweb.js,sha256=Jf6aFOQ1OIY4q7fINYz-m5LsI3seMus124M5SYYZmtE,443659
|
4
|
-
yeref/yeref.py,sha256=wRpSWql996MWX-i-4GjL4SUHNmNjwheGS0I0yrx7eRg,1056354
|
5
|
-
yeref-0.25.8.dist-info/METADATA,sha256=r7S8wQffOkNnQYvIax3QoxDC28xrNrqWvLC4mxytJLc,118
|
6
|
-
yeref-0.25.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
7
|
-
yeref-0.25.8.dist-info/top_level.txt,sha256=yCQKchWHbfV-3OuQPYRdi2loypD-nmbDJbtt3OuKKkY,6
|
8
|
-
yeref-0.25.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|