mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Move all dbus interaction to dbus package
This commit is contained in:
parent
7e9940be4a
commit
9741c93ce9
4 changed files with 31 additions and 31 deletions
|
@ -50,6 +50,7 @@ import org.freedesktop.dbus.DBusMap;
|
|||
import org.freedesktop.dbus.DBusPath;
|
||||
import org.freedesktop.dbus.connections.impl.DBusConnection;
|
||||
import org.freedesktop.dbus.exceptions.DBusException;
|
||||
import org.freedesktop.dbus.exceptions.DBusExecutionException;
|
||||
import org.freedesktop.dbus.interfaces.DBusInterface;
|
||||
import org.freedesktop.dbus.interfaces.DBusSigHandler;
|
||||
import org.freedesktop.dbus.types.Variant;
|
||||
|
@ -342,8 +343,13 @@ public class DbusManagerImpl implements Manager {
|
|||
|
||||
@Override
|
||||
public Pair<GroupId, SendGroupMessageResults> joinGroup(final GroupInviteLinkUrl inviteLinkUrl) throws IOException, InactiveGroupLinkException {
|
||||
final var newGroupId = signal.joinGroup(inviteLinkUrl.getUrl());
|
||||
return new Pair<>(GroupId.unknownVersion(newGroupId), new SendGroupMessageResults(0, List.of()));
|
||||
try {
|
||||
final var newGroupId = signal.joinGroup(inviteLinkUrl.getUrl());
|
||||
return new Pair<>(GroupId.unknownVersion(newGroupId), new SendGroupMessageResults(0, List.of()));
|
||||
} catch (DBusExecutionException e) {
|
||||
throw new IOException("Failed to join group: " + e.getMessage() + " (" + e.getClass().getSimpleName() + ")",
|
||||
e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue