extend DBus signals for DbusAttachments

This change creates the DBus signals `SyncMessageReceivedV2` and `MessageReceivedV2`, as well as the new data type `DbusAttachment`.

    A DbusAttachment is a struct that contains considerably more information than the filename.

    To maintain backward compatibility, `SyncMessageReceived` and `MessageReceived` remain unchanged.

    V2 includes Mentions and DbusAttachments.

    This change also permits sending arbitrary URLs as attachment names.
This commit is contained in:
John Freed 2021-08-13 10:11:44 +02:00
parent 114b932386
commit c77b2e9511
18 changed files with 446 additions and 47 deletions

View file

@ -163,7 +163,7 @@ public class App {
username = usernames.get(0);
} else if (!PhoneNumberFormatter.isValidNumber(username, null)) {
throw new UserErrorException("Invalid username (phone number), make sure you include the country code.");
throw new UserErrorException("Invalid username (phone number), make sure you include a plus sign (+) followed by the country code.");
}
if (command instanceof RegistrationCommand) {
@ -264,6 +264,7 @@ public class App {
try {
manager = Manager.init(username, dataPath, serviceEnvironment, BaseConfig.USER_AGENT);
} catch (NotRegisteredException e) {
logger.debug("dataPath=" + dataPath + " serviceEnvironment=" + serviceEnvironment, e);
throw new UserErrorException("User " + username + " is not registered.");
} catch (Throwable e) {
logger.debug("Loading state file failed", e);