File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed
Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -32,8 +32,12 @@ const ChatHeader = ({
3232 const oppositeUserId = room
3333 ? room . groupName
3434 ? null
35- : room . participants . find ( ( id ) => id !== selfUser ?. _id )
36- : participants ?. find ( ( id ) => id !== selfUser ?. _id ) ;
35+ : room . participants . find (
36+ ( id ) => id !== selfUser ?. _id && ! id . startsWith ( "system" ) ,
37+ )
38+ : participants ?. find (
39+ ( id ) => id !== selfUser ?. _id && ! id . startsWith ( "system" ) ,
40+ ) ;
3741 const oppositeUser = users . find ( ( { _id } ) => _id === oppositeUserId ) ;
3842
3943 const renderMembersOrOnline = ( ) => {
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ const MessageList = ({ onPress }: MessageListProps) => {
7979 return room . groupName . toLowerCase ( ) ;
8080 } else {
8181 const oppositeUserId = room . participants . find (
82- ( id ) => id !== selfUser ?. _id ,
82+ ( id ) => id !== selfUser ?. _id && ! id . startsWith ( "system" ) ,
8383 ) ;
8484 return (
8585 users
Original file line number Diff line number Diff line change @@ -120,7 +120,9 @@ const RoomCard = ({ room, onClickAction }: RoomCardProps) => {
120120
121121 const oppositeUserId = room . groupName
122122 ? null
123- : room . participants . find ( ( id ) => id !== selfUser ?. _id ) ;
123+ : room . participants . find (
124+ ( id ) => id !== selfUser ?. _id && ! id . startsWith ( "system" ) ,
125+ ) ;
124126 const oppositeUser = oppositeUserId
125127 ? users . find ( ( user : UserProps ) => user . _id === oppositeUserId )
126128 : null ;
You can’t perform that action at this time.
0 commit comments