@@ -6,7 +6,6 @@ import CONST from '@src/CONST';
6
6
import ONYXKEYS from '@src/ONYXKEYS' ;
7
7
import type { PersonalDetails , PersonalDetailsList , ReportActions , TransactionViolation } from '@src/types/onyx' ;
8
8
import type Beta from '@src/types/onyx/Beta' ;
9
- import type { OriginalMessageChangeLog } from '@src/types/onyx/OriginalMessage' ;
10
9
import type Policy from '@src/types/onyx/Policy' ;
11
10
import type PriorityMode from '@src/types/onyx/PriorityMode' ;
12
11
import type Report from '@src/types/onyx/Report' ;
@@ -424,9 +423,11 @@ function getOptionData({
424
423
: ` ${ Localize . translate ( preferredLocale , 'workspace.invite.from' ) } ` ;
425
424
result . alternateText += `${ preposition } ${ roomName } ` ;
426
425
}
427
- } else if ( lastActionName === CONST . REPORT . ACTIONS . TYPE . ROOM_CHANGE_LOG . UPDATE_ROOM_DESCRIPTION ) {
428
- const lastActionOriginalMessage = lastAction ?. actionName ? ( ReportActionsUtils . getOriginalMessage ( lastAction ) as OriginalMessageChangeLog | undefined ) : null ;
429
- result . alternateText = `${ lastActorDisplayName } ${ Localize . translate ( preferredLocale , 'roomChangeLog.updateRoomDescription' ) } ${ lastActionOriginalMessage ?. description } ` . trim ( ) ;
426
+ } else if ( ReportActionsUtils . isActionOfType ( lastAction , CONST . REPORT . ACTIONS . TYPE . ROOM_CHANGE_LOG . UPDATE_ROOM_DESCRIPTION ) ) {
427
+ const lastActionOriginalMessage = ReportActionsUtils . getOriginalMessage ( lastAction ) ;
428
+ result . alternateText = `${ lastActorDisplayName } ${ Localize . translate ( preferredLocale , 'roomChangeLog.updateRoomDescription' ) } ${ Parser . htmlToText (
429
+ lastActionOriginalMessage ?. description ?? '' ,
430
+ ) } `. trim ( ) ;
430
431
} else if ( lastAction ?. actionName === CONST . REPORT . ACTIONS . TYPE . POLICY_CHANGE_LOG . LEAVE_POLICY ) {
431
432
result . alternateText = Localize . translateLocal ( 'workspace.invite.leftWorkspace' ) ;
432
433
} else if ( lastAction ?. actionName !== CONST . REPORT . ACTIONS . TYPE . REPORT_PREVIEW && lastActorDisplayName && lastMessageTextFromReport ) {
0 commit comments