diff --git a/app/client_bot/routers/content.py b/app/client_bot/routers/content.py index f9ac81f..6a8d557 100644 --- a/app/client_bot/routers/content.py +++ b/app/client_bot/routers/content.py @@ -101,6 +101,7 @@ async def t_inline_query_node_content(query: types.InlineQuery, memory=None, use source_args = query.query[1:] source_args_ext = query.query + args = None if source_args.startswith('Q'): license_onchain_address = source_args[1:] licensed_content = db_session.query(UserContent).filter_by( @@ -111,6 +112,7 @@ async def t_inline_query_node_content(query: types.InlineQuery, memory=None, use else: args = source_args[1:] + make_log("InlineSearch", f"Query '{query.query}' is a content query with args '{args}'.", level='info') cid = ContentId.deserialize(args) content_list = [] diff --git a/app/core/background/convert_service.py b/app/core/background/convert_service.py index b43ab0a..bd0df39 100644 --- a/app/core/background/convert_service.py +++ b/app/core/background/convert_service.py @@ -202,7 +202,9 @@ async def convert_loop(memory): session.commit() if not unprocessed_encrypted_content.meta.get('upload_notify_msg_id'): - wallet_owner_connection = session.query(WalletConnection).order_by(WalletConnection.id.desc()).first() + wallet_owner_connection = session.query(WalletConnection).filter( + WalletConnection.wallet_address == unprocessed_encrypted_content.owner_address + ).order_by(WalletConnection.id.desc()).first() if wallet_owner_connection: wallet_owner_user = wallet_owner_connection.user wallet_owner_bot = Wrapped_CBotChat(memory._client_telegram_bot, chat_id=wallet_owner_user.telegram_id, user=wallet_owner_user, db_session=session)