Skip to content

Commit

Permalink
improve: forward name of replied messages
Browse files Browse the repository at this point in the history
  • Loading branch information
luvletter2333 committed Apr 4, 2023
1 parent 68f4193 commit bb72900
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6169,7 +6169,7 @@ private void setMessageContent(MessageObject messageObject, MessageObject.Groupe
}
}
} else {
drawForwardedName = messageObject.messageOwner.fwd_from != null && !(messageObject.isAnyKindOfSticker() && messageObject.isDice());
drawForwardedName = messageObject.messageOwner.fwd_from != null && !(messageObject.isAnyKindOfSticker() || messageObject.isDice());
if (!messageObject.isAnyKindOfSticker() && messageObject.type != MessageObject.TYPE_ROUND_VIDEO) {
drawName = (messageObject.isFromGroup() && messageObject.isSupergroup() || messageObject.isImportedForward() && messageObject.messageOwner.fwd_from.from_id == null) && (currentPosition == null || (currentPosition.flags & MessageObject.POSITION_FLAG_TOP) != 0);
}
Expand Down Expand Up @@ -12811,9 +12811,12 @@ protected void onClick() {
} else if (messageObject.customReplyName != null) {
name = messageObject.customReplyName;
} else {
// if (drawForwardedName) {
// name = messageObject.replyMessageObject.getForwardedName();
// }
if (drawForwardedName) {
String fwdName = messageObject.replyMessageObject.getForwardedName();
if (fwdName != null && messageObject.getForwardedName() != null)
name = fwdName;
// show fwdname from replied message when this message and the replied message is all forwarded message
}

if (name == null) {
long fromId = messageObject.replyMessageObject.getFromChatId();
Expand Down

0 comments on commit bb72900

Please sign in to comment.