@@ -19,7 +19,7 @@ import { IMessagePayload, TwitterFeedReturnType } from '../exportedTypes';
19
19
const SenderMessageAddress = ( { chat } : { chat : IMessagePayload } ) => {
20
20
const { user } = useContext ( ChatDataContext ) ;
21
21
const theme = useContext ( ThemeContext ) ;
22
- return chat . fromCAIP10 == user ?. account ? (
22
+ return chat . fromCAIP10 ! == user ?. account ? (
23
23
< Span
24
24
theme = { theme }
25
25
alignSelf = "start"
@@ -55,7 +55,7 @@ const SenderMessageProfilePicture = ({ chat }: { chat: IMessagePayload }) => {
55
55
justifyContent = "start"
56
56
alignItems = "start"
57
57
>
58
- { chat . fromCAIP10 == user ?. account && (
58
+ { chat . fromCAIP10 ! == user ?. account && (
59
59
< Section alignItems = "start" >
60
60
{ pfp && (
61
61
< Image
@@ -83,6 +83,7 @@ const MessageWrapper = ({
83
83
isGroup : boolean ;
84
84
maxWidth ?: string ;
85
85
} ) => {
86
+ const { user } = useChatData ( ) ;
86
87
const theme = useContext ( ThemeContext ) ;
87
88
return (
88
89
< Section
@@ -93,12 +94,12 @@ const MessageWrapper = ({
93
94
width = "fit-content"
94
95
maxWidth = { maxWidth || 'auto' }
95
96
>
96
- { isGroup && < SenderMessageProfilePicture chat = { chat } /> }
97
+ { isGroup && chat ?. fromCAIP10 !== user ?. account && < SenderMessageProfilePicture chat = { chat } /> }
97
98
< Section
98
99
justifyContent = "start"
99
100
flexDirection = "column"
100
101
>
101
- { isGroup && < SenderMessageAddress chat = { chat } /> }
102
+ { isGroup && chat ?. fromCAIP10 !== user ?. account && < SenderMessageAddress chat = { chat } /> }
102
103
{ children }
103
104
</ Section >
104
105
</ Section >
@@ -108,7 +109,6 @@ const MessageWrapper = ({
108
109
const MessageCard = ( { chat, position, isGroup } : { chat : IMessagePayload ; position : number ; isGroup : boolean } ) => {
109
110
const theme = useContext ( ThemeContext ) ;
110
111
const time = moment ( chat . timestamp ) . format ( 'hh:mm a' ) ;
111
- console . debug ( position ) ;
112
112
return (
113
113
< MessageWrapper
114
114
chat = { chat }
@@ -322,15 +322,13 @@ export const ChatViewBubble = ({
322
322
isGroup ?: boolean ;
323
323
} ) => {
324
324
const { user } = useChatData ( ) ;
325
-
326
325
const position =
327
326
pCAIP10ToWallet ( decryptedMessagePayload . fromDID ) . toLowerCase ( ) !== pCAIP10ToWallet ( user ?. account ! ) ?. toLowerCase ( )
328
327
? 0
329
328
: 1 ;
330
329
const { tweetId, messageType } : TwitterFeedReturnType = checkTwitterUrl ( {
331
330
message : decryptedMessagePayload ?. messageContent ,
332
331
} ) ;
333
- console . debug ( user , position , 'position' ) ;
334
332
if ( messageType === 'TwitterFeedLink' ) {
335
333
decryptedMessagePayload . messageType = 'TwitterFeedLink' ;
336
334
}
0 commit comments