Skip to content

Commit

Permalink
fix: Quick Toggle Anonymous in channel
Browse files Browse the repository at this point in the history
  • Loading branch information
omg-xtao committed Oct 26, 2024
1 parent 6d4799b commit a06e17f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3737,7 +3737,7 @@ private void createSenderSelectView() {
if (chatFull != null) {

var chat = controller.getChat(chatFull.id);
if (chat != null && chat.creator) {
if (chat != null && ChatObject.isMegagroup(chat) && chat.creator) {
var self = UserConfig.getInstance(currentAccount).getCurrentUser();

if (peer.channel_id == chat.id) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ protected int getSuggestedMinimumWidth() {

if (NaConfig.INSTANCE.getQuickToggleAnonymous().Bool()) {
var chat = messagesController.getChat(chatFull.id);
if (chat != null && chat.creator) {
if (chat != null && ChatObject.isMegagroup(chat) && chat.creator) {
if (peers.stream().noneMatch(peer -> peer.peer.channel_id == chat.id)) {
peers.add(peers.size() >= 1 ? 1 : 0, new TLRPC.TL_sendAsPeer() {{
peer = new TLRPC.TL_peerChannel() {{ channel_id = chat.id; }};
Expand Down

0 comments on commit a06e17f

Please # to comment.