@@ -648,7 +648,6 @@ async def append_log(
648
648
message : Message ,
649
649
* ,
650
650
message_id : str = "" ,
651
- log_key : str = None ,
652
651
channel_id : str = "" ,
653
652
type_ : str = "thread_message" ,
654
653
) -> dict :
@@ -679,31 +678,14 @@ async def append_log(
679
678
],
680
679
}
681
680
682
- # Use log_key if provided, fallback to channel_id for legacy support
683
- if log_key :
684
- return await self .logs .find_one_and_update (
685
- {"key" : log_key }, {"$push" : {"messages" : data }}, return_document = True
686
- )
687
- else :
688
- return await self .logs .find_one_and_update (
689
- {"channel_id" : channel_id }, {"$push" : {"messages" : data }}, return_document = True
690
- )
691
-
692
- async def get_log_by_key (self , log_key : str ) -> dict :
693
- return await self .logs .find_one ({"key" : log_key })
694
-
695
- async def post_log_by_key (self , log_key : str , data : dict ) -> dict :
696
- return await self .logs .find_one_and_update ({"key" : log_key }, {"$set" : data }, return_document = True )
681
+ return await self .logs .find_one_and_update (
682
+ {"channel_id" : channel_id }, {"$push" : {"messages" : data }}, return_document = True
683
+ )
697
684
698
- async def post_log (
699
- self , channel_id : Union [int , str ] = None , data : dict = None , log_key : str = None
700
- ) -> dict :
701
- if log_key :
702
- return await self .post_log_by_key (log_key , data )
703
- else :
704
- return await self .logs .find_one_and_update (
705
- {"channel_id" : str (channel_id )}, {"$set" : data }, return_document = True
706
- )
685
+ async def post_log (self , channel_id : Union [int , str ], data : dict ) -> dict :
686
+ return await self .logs .find_one_and_update (
687
+ {"channel_id" : str (channel_id )}, {"$set" : data }, return_document = True
688
+ )
707
689
708
690
async def search_closed_by (self , user_id : Union [int , str ]):
709
691
return await self .logs .find (
0 commit comments