Skip to content

Commit

Permalink
fix: hidden NPE when forward to saved msgs
Browse files Browse the repository at this point in the history
  • Loading branch information
dic1911 committed Mar 16, 2024
1 parent 99641d9 commit ceb9619
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -30305,11 +30305,15 @@ public boolean didSelectDialogs(DialogsActivity fragment, ArrayList<MessagesStor
hideFieldPanel(false);
for (int a = 0; a < dids.size(); a++) {
long did = dids.get(a).dialogId;
SendMessagesHelper.SendMessageParams params = SendMessagesHelper.SendMessageParams.of(message.toString(), did, null, null, null, true, null, null, null, true, 0, null, false);
params.quick_reply_shortcut = quickReplyShortcut;
params.quick_reply_shortcut_id = getQuickReplyId();
if (message != null && !NekoConfig.sendCommentAfterForward.Bool()) {
getSendMessagesHelper().sendMessage(params);
SendMessagesHelper.SendMessageParams params = null;
if (message != null) {
SendMessagesHelper.SendMessageParams.of(message.toString(), did, null, null, null, true, null, null, null, true, 0, null, false);
params.quick_reply_shortcut = quickReplyShortcut;
params.quick_reply_shortcut_id = getQuickReplyId();

if (!NekoConfig.sendCommentAfterForward.Bool()) {
getSendMessagesHelper().sendMessage(params);
}
}
forwardMessages(fmessages, noForwardQuote, true, 0, did);
if (message != null && NekoConfig.sendCommentAfterForward.Bool()) {
Expand Down

0 comments on commit ceb9619

Please sign in to comment.