(threadType: ThreadType, parentThreadID: ?string)
| 1110 | `To move a chat over here, switch the “Muted” option in its settings.`; |
| 1111 | |
| 1112 | function threadNoun(threadType: ThreadType, parentThreadID: ?string): string { |
| 1113 | if (threadTypeIsSidebar(threadType)) { |
| 1114 | return 'thread'; |
| 1115 | } else if ( |
| 1116 | threadType === threadTypes.COMMUNITY_SECRET_SUBTHREAD && |
| 1117 | parentThreadID === genesis().id |
| 1118 | ) { |
| 1119 | return 'chat'; |
| 1120 | } else if ( |
| 1121 | threadType === threadTypes.COMMUNITY_ROOT || |
| 1122 | threadType === threadTypes.COMMUNITY_ANNOUNCEMENT_ROOT || |
| 1123 | threadType === threadTypes.COMMUNITY_OPEN_SUBTHREAD || |
| 1124 | threadType === threadTypes.COMMUNITY_OPEN_ANNOUNCEMENT_SUBTHREAD || |
| 1125 | threadType === threadTypes.COMMUNITY_SECRET_SUBTHREAD || |
| 1126 | threadType === threadTypes.COMMUNITY_SECRET_ANNOUNCEMENT_SUBTHREAD || |
| 1127 | threadType === threadTypes.GENESIS |
| 1128 | ) { |
| 1129 | return 'channel'; |
| 1130 | } else { |
| 1131 | return 'chat'; |
| 1132 | } |
| 1133 | } |
| 1134 | |
| 1135 | function threadLabel(threadType: ThreadType): string { |
| 1136 | return threadSpecs[threadType].threadLabel; |
no test coverage detected