Skip to content

Commit

Permalink
sepinf-inc#2286: prefer Telegram chat names from decoded data in orde…
Browse files Browse the repository at this point in the history
…r to avoid lower case names
  • Loading branch information
aberenguel committed Aug 8, 2024
1 parent 69089c1 commit f5e4020
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

import org.apache.commons.codec.binary.Hex;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -182,7 +183,8 @@ protected List<Chat> extractChatList() throws Exception {

searchAvatarFileName(cont, androidDecoder.getPhotoData());

ChatGroup group = new ChatGroup(chatId, cont, chatName);
String chatNameToUse = StringUtils.firstNonBlank((String) androidDecoder.getAlltMetadata().get("title"), chatName);
ChatGroup group = new ChatGroup(chatId, cont, chatNameToUse);

Map<String, Object> m = androidDecoder.getAlltMetadata();
if ("true".equals(m.get("broadcast"))) {
Expand Down

0 comments on commit f5e4020

Please sign in to comment.