* some small dbus return code fixes
* Added DBus manpage
* changed getDisplayName behaviour
* reverted change in manager
if (profileEntry != null && profileEntry.getProfile() != null) {
return profileEntry.getProfile().getDisplayName();
}
-
return null;
}
public String getDisplayName() {
// First name and last name (if set) are separated by a NULL char + trim space in case only one is filled
- return name == null ? null : name.replace("\0", " ").trim();
+ return name == null ? "" : name.replace("\0", " ").trim();
}
public String getAbout() {
private String formatContact(SignalServiceAddress address) {
final var number = address.getLegacyIdentifier();
var name = m.getContactOrProfileName(number);
- if (name == null) {
+ if (name == null || name.isEmpty()) {
return number;
} else {
return MessageFormatter.arrayFormat("“{}” {}", new Object[]{name, number}).getMessage();
public void joinGroup(final String groupLink) {
try {
final var linkUrl = GroupInviteLinkUrl.fromUri(groupLink);
+ if (linkUrl == null) {
+ throw new Error.Failure("Group link is invalid:");
+ }
m.joinGroup(linkUrl);
} catch (GroupInviteLinkUrl.InvalidGroupLinkException | GroupLinkNotActiveException e) {
throw new Error.Failure("Group link is invalid: " + e.getMessage());