Data export, warnings' improvements, bug fixes #35

Merged
profitroll merged 30 commits from dev into master 2023-04-02 23:27:31 +03:00
Showing only changes of commit ed2361638a - Show all commits

View File

@ -1,3 +1,4 @@
from os import path
from traceback import print_exc from traceback import print_exc
from app import app from app import app
from pyrogram import filters from pyrogram import filters
@ -6,7 +7,7 @@ from pyrogram.client import Client
from classes.holo_user import HoloUser from classes.holo_user import HoloUser
from modules import custom_filters from modules import custom_filters
from modules.logging import logWrite from modules.logging import logWrite
from modules.utils import configGet, locale, should_quote, find_location from modules.utils import configGet, jsonLoad, locale, should_quote, find_location
from modules.database import col_applications, col_users from modules.database import col_applications, col_users
from classes.errors.geo import PlaceNotFoundError from classes.errors.geo import PlaceNotFoundError
@ -43,6 +44,7 @@ async def cmd_nearby(app: Client, msg: Message):
if not entry["user"] == msg.from_user.id: if not entry["user"] == msg.from_user.id:
user = col_users.find_one( {"user": entry["user"]} ) user = col_users.find_one( {"user": entry["user"]} )
if user is not None: if user is not None:
if entry["user"] in jsonLoad(path.join(configGet("cache", "locations"), "group_members")):
if user["tg_username"] not in [None, "None", ""]: # Check if user has any name if user["tg_username"] not in [None, "None", ""]: # Check if user has any name
output.append(f'• **{user["tg_name"]}** (@{user["tg_username"]}):\n - {entry["application"]["3"]["name"]}, {entry["application"]["3"]["adminName1"]}') output.append(f'• **{user["tg_name"]}** (@{user["tg_username"]}):\n - {entry["application"]["3"]["name"]}, {entry["application"]["3"]["adminName1"]}')
else: else: