mirror of
https://github.com/AsamK/signal-cli
synced 2025-09-02 20:40:38 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
a05a23f85d
7 changed files with 29 additions and 5 deletions
8
CONTRIBUTING.md
Normal file
8
CONTRIBUTING.md
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# Question
|
||||||
|
If you have a question you can ask it in the [GitHub discussions page](https://github.com/AsamK/signal-cli/discussions)
|
||||||
|
|
||||||
|
# Report a bug
|
||||||
|
- Search [existing issues](https://github.com/AsamK/signal-cli/issues?q=is%3Aissue) if it has been reported already
|
||||||
|
- If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/AsamK/signal-cli/issues/new).
|
||||||
|
- Be sure to include a **title and clear description**, as much relevant information as possible.
|
||||||
|
- Run the failing command with `--verbose` flag to get a more detailed log output and include that in the bug report
|
1
FUNDING.yml
Normal file
1
FUNDING.yml
Normal file
|
@ -0,0 +1 @@
|
||||||
|
liberapay: asamk
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ public final class CachedMessage {
|
||||||
public SignalServiceEnvelope loadEnvelope() {
|
public SignalServiceEnvelope loadEnvelope() {
|
||||||
try {
|
try {
|
||||||
return MessageCacheUtils.loadEnvelope(file);
|
return MessageCacheUtils.loadEnvelope(file);
|
||||||
} catch (IOException e) {
|
} catch (Exception e) {
|
||||||
logger.error("Failed to load cached message envelope “{}”: {}", file, e.getMessage());
|
logger.error("Failed to load cached message envelope “{}”: {}", file, e.getMessage());
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -181,7 +181,11 @@ public class App {
|
||||||
try {
|
try {
|
||||||
manager = RegistrationManager.init(username, dataPath, serviceEnvironment, BaseConfig.USER_AGENT);
|
manager = RegistrationManager.init(username, dataPath, serviceEnvironment, BaseConfig.USER_AGENT);
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
throw new UnexpectedErrorException("Error loading or creating state file: " + e.getMessage());
|
throw new UnexpectedErrorException("Error loading or creating state file: "
|
||||||
|
+ e.getMessage()
|
||||||
|
+ " ("
|
||||||
|
+ e.getClass().getSimpleName()
|
||||||
|
+ ")");
|
||||||
}
|
}
|
||||||
try (var m = manager) {
|
try (var m = manager) {
|
||||||
command.handleCommand(ns, m);
|
command.handleCommand(ns, m);
|
||||||
|
@ -234,7 +238,13 @@ public class App {
|
||||||
} catch (NotRegisteredException e) {
|
} catch (NotRegisteredException e) {
|
||||||
throw new UserErrorException("User " + username + " is not registered.");
|
throw new UserErrorException("User " + username + " is not registered.");
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
throw new UnexpectedErrorException("Error loading state file for user " + username + ": " + e.getMessage());
|
throw new UnexpectedErrorException("Error loading state file for user "
|
||||||
|
+ username
|
||||||
|
+ ": "
|
||||||
|
+ e.getMessage()
|
||||||
|
+ " ("
|
||||||
|
+ e.getClass().getSimpleName()
|
||||||
|
+ ")");
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue