Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Adimarantis 2021-02-28 16:32:42 +01:00
commit a05a23f85d
7 changed files with 29 additions and 5 deletions

View file

@ -2365,7 +2365,7 @@ public class Manager implements Closeable {
final var profileEntry = account.getProfileStore().getProfileEntry(address);
if (profileEntry != null && profileEntry.getProfile() != null) {
return profileEntry.getProfile().getName();
return profileEntry.getProfile().getDisplayName();
}
return null;

View file

@ -183,7 +183,7 @@ public class GroupHelper {
.collect(Collectors.toSet());
if (noGv2Capability.size() > 0) {
logger.warn("Cannot create a V2 group as some members don't support Groups V2: {}",
noGv2Capability.stream().map(SignalProfile::getName).collect(Collectors.joining(", ")));
noGv2Capability.stream().map(SignalProfile::getDisplayName).collect(Collectors.joining(", ")));
return false;
}

View file

@ -22,7 +22,7 @@ public final class CachedMessage {
public SignalServiceEnvelope loadEnvelope() {
try {
return MessageCacheUtils.loadEnvelope(file);
} catch (IOException e) {
} catch (Exception e) {
logger.error("Failed to load cached message envelope “{}”: {}", file, e.getMessage());
return null;
}

View file

@ -75,6 +75,11 @@ public class SignalProfile {
return name;
}
public String getDisplayName() {
// First name and last name (if set) are separated by a NULL char
return name == null ? null : name.replace("\0", " ");
}
public String getAbout() {
return about;
}