Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
import CONST from '../CONST';

type IsReportMessageAttachmentParams = {
text: string;
html: string;
translationKey: string;
};

/**
* Check whether a report action is Attachment or not.
* Ignore messages containing [Attachment] as the main content. Attachments are actions with only text as [Attachment].
*
* @param {Object} reportActionMessage report action's message as text, html and translationKey
* @returns {Boolean}
* @param reportActionMessage report action's message as text, html and translationKey
*/
export default function isReportMessageAttachment({text, html, translationKey}) {
export default function isReportMessageAttachment({text, html, translationKey}: IsReportMessageAttachmentParams): boolean {
if (translationKey) {
return translationKey === CONST.TRANSLATION_KEYS.ATTACHMENT;
}
Expand Down