Skip to content

Commit

Permalink
fix: check user activated before check bot
Browse files Browse the repository at this point in the history
  • Loading branch information
omg-xtao committed May 8, 2024
1 parent 849a869 commit e3d8d63
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2449,7 +2449,7 @@ public void loadArchivedStickersCount(int type, boolean cache) {
archivedStickersCount[type] = count;
getNotificationCenter().postNotificationName(NotificationCenter.archivedStickersCountDidLoad, type);
}
} else if (getUserConfig().getCurrentUser() != null && !getUserConfig().getCurrentUser().bot) {
} else if (getUserConfig().isClientActivated() && !getUserConfig().getCurrentUser().bot) {
TLRPC.TL_messages_getArchivedStickers req = new TLRPC.TL_messages_getArchivedStickers();
req.limit = 0;
req.masks = type == TYPE_MASK;
Expand Down Expand Up @@ -2830,7 +2830,7 @@ public void loadStickers(int type, boolean cache, boolean force, boolean schedul
}
});
});
} else if(!getUserConfig().getCurrentUser().bot) {
} else if (getUserConfig().isClientActivated() && !getUserConfig().getCurrentUser().bot) {
if (type == TYPE_FEATURED || type == TYPE_FEATURED_EMOJIPACKS) {
final boolean emoji = type == TYPE_FEATURED_EMOJIPACKS;
TLRPC.TL_messages_allStickers response = new TLRPC.TL_messages_allStickers();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ private void resetItems() {
return true;
}));
}
if (NekoXConfig.disableStatusUpdate && !UserConfig.getInstance(UserConfig.selectedAccount).getCurrentUser().bot) {
if (NekoXConfig.disableStatusUpdate && UserConfig.getInstance(UserConfig.selectedAccount).isClientActivated() && !UserConfig.getInstance(UserConfig.selectedAccount).getCurrentUser().bot) {
boolean online = MessagesController.getInstance(UserConfig.selectedAccount).isOnline();
String message = online ? StrUtil.upperFirst(LocaleController.getString("Online", R.string.Online)) : LocaleController.getString("VoipOfflineTitle", R.string.VoipOfflineTitle);
if (NekoXConfig.keepOnlineStatus) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30405,7 +30405,7 @@ private void startEditingMessageObject(MessageObject messageObject) {
updatePinnedMessageView(true);
updateVisibleRows();

if (!messageObject.scheduled && !messageObject.isQuickReply() && !getUserConfig().getCurrentUser().bot) {
if (!messageObject.scheduled && !messageObject.isQuickReply() && getUserConfig().isClientActivated() && !getUserConfig().getCurrentUser().bot) {
TLRPC.TL_messages_getMessageEditData req = new TLRPC.TL_messages_getMessageEditData();
req.peer = getMessagesController().getInputPeer(dialog_id);
req.id = messageObject.getId();
Expand Down

0 comments on commit e3d8d63

Please sign in to comment.