@@ -76,6 +76,10 @@ def transform(self, data: Dict[str, Any]) -> List[Base]:
7676 for msg in chat_data .contents :
7777 if hasattr (msg , 'fromId' ) and msg .fromId and hasattr (msg .fromId , 'userId' ):
7878 participants .add (msg .fromId .userId )
79+ if hasattr (msg , 'fromId' ) and msg .fromId and hasattr (msg .fromId , 'channelId' ):
80+ participants .add (msg .fromId .channelId )
81+ if hasattr (msg , 'fromId' ) and msg .fromId and hasattr (msg .fromId , 'chatId' ):
82+ participants .add (msg .fromId .chatId )
7983
8084 # Create SubmissionChat record
8185 chat_id = str (uuid .uuid4 ())
@@ -102,6 +106,10 @@ def transform(self, data: Dict[str, Any]) -> List[Base]:
102106 sender_id = "unknown"
103107 if hasattr (msg_content , 'fromId' ) and msg_content .fromId and hasattr (msg_content .fromId , 'userId' ):
104108 sender_id = str (msg_content .fromId .userId )
109+ elif hasattr (msg_content , 'fromId' ) and msg_content .fromId and hasattr (msg_content .fromId , 'channelId' ):
110+ sender_id = str (msg_content .fromId .channelId )
111+ elif hasattr (msg_content , 'fromId' ) and msg_content .fromId and hasattr (msg_content .fromId , 'chatId' ):
112+ sender_id = str (msg_content .fromId .chatId )
105113
106114 # Get chat ID
107115 chat_source_id = str (chat_data .chat_id )
0 commit comments