Group Description: Edit/Receive

This commit is contained in:
Scott Nonnenberg 2021-06-01 17:24:28 -07:00 committed by GitHub
parent e5d365dfc4
commit 9705f464be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 859 additions and 149 deletions

View file

@ -828,6 +828,29 @@ export function renderChangeDetail(
}
return renderString('GroupV2--group-link-remove--unknown', i18n);
}
if (detail.type === 'description') {
if (detail.removed) {
if (fromYou) {
return renderString('GroupV2--description--remove--you', i18n);
}
if (from) {
return renderString('GroupV2--description--remove--other', i18n, [
renderContact(from),
]);
}
return renderString('GroupV2--description--remove--unknown', i18n);
}
if (fromYou) {
return renderString('GroupV2--description--change--you', i18n);
}
if (from) {
return renderString('GroupV2--description--change--other', i18n, [
renderContact(from),
]);
}
return renderString('GroupV2--description--change--unknown', i18n);
}
throw missingCaseError(detail);
}