Skip to content

Recent #351

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,3 @@
"formation": {
"worker": {
"quantity": 1,
"size": "eco"
}
}
}

2 changes: 1 addition & 1 deletion helper_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ async def get_message_id(client, message):
elif message.forward_sender_name:
return 0
elif message.text:
pattern = "https://t.me/(?:c/)?(.*)/(\d+)"
pattern = "https://telegram.me/(?:c/)?(.*)/(\d+)"
matches = re.match(pattern,message.text)
if not matches:
return 0
Expand Down
4 changes: 2 additions & 2 deletions plugins/channel_post.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async def channel_post(client: Client, message: Message):
converted_id = post_message.id * abs(client.db_channel.id)
string = f"get-{converted_id}"
base64_string = await encode(string)
link = f"https://t.me/{client.username}?start={base64_string}"
link = f"https://telegram.me/{client.username}?start={base64_string}"

reply_markup = InlineKeyboardMarkup([[InlineKeyboardButton("🔁 Share URL", url=f'https://telegram.me/share/url?url={link}')]])

Expand All @@ -48,7 +48,7 @@ async def new_post(client: Client, message: Message):
converted_id = message.id * abs(client.db_channel.id)
string = f"get-{converted_id}"
base64_string = await encode(string)
link = f"https://t.me/{client.username}?start={base64_string}"
link = f"https://telegram.me/{client.username}?start={base64_string}"
reply_markup = InlineKeyboardMarkup([[InlineKeyboardButton("🔁 Share URL", url=f'https://telegram.me/share/url?url={link}')]])
try:
await message.edit_reply_markup(reply_markup)
Expand Down
4 changes: 2 additions & 2 deletions plugins/link_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async def batch(client: Client, message: Message):

string = f"get-{f_msg_id * abs(client.db_channel.id)}-{s_msg_id * abs(client.db_channel.id)}"
base64_string = await encode(string)
link = f"https://t.me/{client.username}?start={base64_string}"
link = f"https://telegram.me/{client.username}?start={base64_string}"
reply_markup = InlineKeyboardMarkup([[InlineKeyboardButton("🔁 Share URL", url=f'https://telegram.me/share/url?url={link}')]])
await second_message.reply_text(f"<b>Here is your link</b>\n\n{link}", quote=True, reply_markup=reply_markup)

Expand All @@ -55,6 +55,6 @@ async def link_generator(client: Client, message: Message):
continue

base64_string = await encode(f"get-{msg_id * abs(client.db_channel.id)}")
link = f"https://t.me/{client.username}?start={base64_string}"
link = f"https://telegram.me/{client.username}?start={base64_string}"
reply_markup = InlineKeyboardMarkup([[InlineKeyboardButton("🔁 Share URL", url=f'https://telegram.me/share/url?url={link}')]])
await channel_message.reply_text(f"<b>Here is your link</b>\n\n{link}", quote=True, reply_markup=reply_markup)