import java.io.File;
import java.io.IOException;
+import java.io.InputStream;
import java.net.URI;
import java.net.URISyntaxException;
import java.time.Duration;
emptyIfNull(updateProfile.getFamilyName()),
emptyIfNull(updateProfile.getAbout()),
emptyIfNull(updateProfile.getAboutEmoji()),
- updateProfile.getAvatar() == null ? "" : updateProfile.getAvatar().getPath(),
+ updateProfile.getAvatar() == null ? "" : updateProfile.getAvatar(),
updateProfile.isDeleteAvatar());
}
@Override
public Pair<GroupId, SendGroupMessageResults> createGroup(
- final String name, final Set<RecipientIdentifier.Single> members, final File avatarFile
+ final String name, final Set<RecipientIdentifier.Single> members, final String avatarFile
) throws IOException, AttachmentInvalidException {
final var newGroupId = signal.createGroup(emptyIfNull(name),
members.stream().map(RecipientIdentifier.Single::getIdentifier).toList(),
- avatarFile == null ? "" : avatarFile.getPath());
+ avatarFile == null ? "" : avatarFile);
return new Pair<>(GroupId.unknownVersion(newGroupId), new SendGroupMessageResults(0, List.of()));
}
if (updateGroup.getAvatarFile() != null) {
group.Set("org.asamk.Signal.Group",
"Avatar",
- updateGroup.getAvatarFile() == null ? "" : updateGroup.getAvatarFile().getPath());
+ updateGroup.getAvatarFile() == null ? "" : updateGroup.getAvatarFile());
}
if (updateGroup.getExpirationTimer() != null) {
group.Set("org.asamk.Signal.Group", "MessageExpirationTimer", updateGroup.getExpirationTimer());
Optional.empty(),
List.of(),
List.of(),
+ List.of(),
List.of())),
Optional.empty(),
Optional.empty(),
Optional.empty(),
List.of(),
List.of(),
+ List.of(),
List.of())),
Optional.empty())),
Optional.empty(),
}).toList();
}
+ @Override
+ public InputStream retrieveAttachment(final String id) throws IOException {
+ throw new UnsupportedOperationException();
+ }
+
@SuppressWarnings("unchecked")
private <T> T getValue(
final Map<String, Variant<?>> stringVariantMap, final String field