Skip to content

Commit 7ba2431

Browse files
committed
Show paid in group permissions
1 parent 06aea2b commit 7ba2431

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎src/components/sidebarRight/tabs/editChat.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {Chat, ChatFull, ChatParticipants} from '../../../layer';
1414
import AppChatTypeTab from './chatType';
1515
import rootScope from '../../../lib/rootScope';
1616
import AppGroupPermissionsTab from './groupPermissions';
17-
import {i18n, LangPackKey} from '../../../lib/langPack';
17+
import I18n, {i18n, join, LangPackKey} from '../../../lib/langPack';
1818
import PopupDeleteDialog from '../../popups/deleteDialog';
1919
import {attachClickEvent} from '../../../helpers/dom/clickEvent';
2020
import toggleDisability from '../../../helpers/dom/toggleDisability';
@@ -307,7 +307,10 @@ export default class AppEditChatTab extends SliderSuperTab {
307307
});
308308

309309
const setPermissionsLength = () => {
310-
permissionsRow.subtitle.textContent = flags.reduce((acc, f) => acc + +hasRights(chat, f, (chat as Chat.chat).default_banned_rights), 0) + '/' + flags.length;
310+
const permissions = flags.reduce((acc, f) => acc + +hasRights(chat, f, (chat as Chat.chat).default_banned_rights), 0) + '/' + flags.length;
311+
const paid = !!+(chat as Chat.channel)?.send_paid_messages_stars ? I18n.format('PrivacySettingsController.Paid', true) : undefined;
312+
permissionsRow.subtitle.innerHTML = '';
313+
permissionsRow.subtitle.append(...join([permissions, paid].filter(Boolean)));
311314
};
312315

313316
setPermissionsLength();

0 commit comments

Comments
 (0)