File tree Expand file tree Collapse file tree 1 file changed +18
-18
lines changed 
services/static-webserver/client/source/class/osparc/support Expand file tree Collapse file tree 1 file changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -47,25 +47,25 @@ qx.Class.define("osparc.support.ConversationListItem", {
4747  members : { 
4848    __applyConversation : function ( conversation )  { 
4949      conversation . bind ( "nameAlias" ,  this ,  "title" ) ; 
50-       const  messages  =  conversation . getMessages ( ) ; 
51-       if  ( messages  &&  messages . length )  { 
52-         const  lastMessage  =  messages [ 0 ] ; 
53-         const  date  =  osparc . utils . Utils . formatDateAndTime ( new  Date ( lastMessage . created ) ) ; 
54-         this . set ( { 
55-           subtitle : date , 
56-         } ) ; 
57- 
58-         const  userGroupId  =  lastMessage . userGroupId ; 
59-         osparc . store . Users . getInstance ( ) . getUser ( userGroupId ) 
60-           . then ( user  =>  { 
61-             if  ( user )  { 
62-               this . set ( { 
63-                 thumbnail : user . getThumbnail ( ) , 
64-                 subtitle : user . getLabel ( )  +  " - "  +  date , 
50+       osparc . store . ConversationsSupport . getInstance ( ) . getLastMessage ( conversation . getConversationId ( ) ) 
51+         . then ( lastMessage  =>  { 
52+           if  ( lastMessage )  { 
53+             const  date  =  osparc . utils . Utils . formatDateAndTime ( new  Date ( lastMessage . created ) ) ; 
54+             this . set ( { 
55+               subtitle : date , 
56+             } ) ; 
57+             const  userGroupId  =  lastMessage . userGroupId ; 
58+             osparc . store . Users . getInstance ( ) . getUser ( userGroupId ) 
59+               . then ( user  =>  { 
60+                 if  ( user )  { 
61+                   this . set ( { 
62+                     thumbnail : user . getThumbnail ( ) , 
63+                     subtitle : user . getLabel ( )  +  " - "  +  date , 
64+                   } ) ; 
65+                 } 
6566              } ) ; 
66-             } 
67-           } ) ; 
68-       } 
67+           } 
68+       } ) ; 
6969    } , 
7070  } 
7171} ) ; 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments