mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Add getDisplayName to SignalProfile
This commit is contained in:
parent
9ca89b3dfa
commit
8d0de67530
3 changed files with 7 additions and 2 deletions
|
@ -2365,7 +2365,7 @@ public class Manager implements Closeable {
|
||||||
|
|
||||||
final var profileEntry = account.getProfileStore().getProfileEntry(address);
|
final var profileEntry = account.getProfileStore().getProfileEntry(address);
|
||||||
if (profileEntry != null && profileEntry.getProfile() != null) {
|
if (profileEntry != null && profileEntry.getProfile() != null) {
|
||||||
return profileEntry.getProfile().getName();
|
return profileEntry.getProfile().getDisplayName();
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -183,7 +183,7 @@ public class GroupHelper {
|
||||||
.collect(Collectors.toSet());
|
.collect(Collectors.toSet());
|
||||||
if (noGv2Capability.size() > 0) {
|
if (noGv2Capability.size() > 0) {
|
||||||
logger.warn("Cannot create a V2 group as some members don't support Groups V2: {}",
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -75,6 +75,11 @@ public class SignalProfile {
|
||||||
return name;
|
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() {
|
public String getAbout() {
|
||||||
return about;
|
return about;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue