File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ export default class IgcChatMessageComponent extends LitElement {
100100
101101 private get defaultMessageActionsTemplate ( ) {
102102 const isLastMessage = this . message === this . _chatState ?. messages . at ( - 1 ) ;
103- return this . message ?. sender !== 'user' &&
103+ return this . message ?. sender !== this . _chatState ?. currentUserId &&
104104 this . message ?. text . trim ( ) &&
105105 ( ! isLastMessage || ! this . _chatState ?. options ?. isTyping )
106106 ? html `< div part ="message-actions ">
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { property } from 'lit/decorators.js';
44import IgcIconButtonComponent from '../button/icon-button.js' ;
55import { chatContext } from '../common/context.js' ;
66import { registerComponent } from '../common/definitions/register.js' ;
7+ import { partMap } from '../common/part-map.js' ;
78import IgcExpansionPanelComponent from '../expansion-panel/expansion-panel.js' ;
89import IgcIconComponent from '../icon/icon.js' ;
910import { registerIconFromText } from '../icon/icon.registry.js' ;
@@ -173,14 +174,19 @@ export default class IgcMessageAttachmentsComponent extends LitElement {
173174 }
174175
175176 private renderDefaultAttachmentsTemplate ( ) {
177+ const parts = {
178+ 'attachment-header' : true ,
179+ sent : this . message ?. sender === this . _chatState ?. currentUserId ,
180+ } ;
181+
176182 return html `${ this . message ?. attachments ?. map (
177183 ( attachment ) =>
178184 html `< div part ="attachment ">
179185 ${ this . message ?. sender === this . _chatState ?. currentUserId
180186 ? this . renderAttachmentContent ( attachment )
181187 : nothing }
182188 < div
183- part =" attachment-header "
189+ part =${ partMap ( parts ) }
184190 role ="button"
185191 @click=${ ( ) => this . handleHeaderClick ( attachment ) }
186192 >
You can’t perform that action at this time.
0 commit comments