]> nmode's Git Repositories - signal-cli/commit
Fix handling of attachments in JSON RPC (#1109)
authorced-b <cedric@cos.flag.org>
Thu, 24 Nov 2022 16:29:45 +0000 (11:29 -0500)
committerGitHub <noreply@github.com>
Thu, 24 Nov 2022 16:29:45 +0000 (17:29 +0100)
commit35def4445d13011f4feb9f6422546b88ce32bda0
tree5fdb303d2329dd266cd2de0a0f948729658b3431
parent3e60303b90ff8c7c6fad390b45bc9338afdfb1c6
Fix handling of attachments in JSON RPC (#1109)

* Fix handling of attachments in JSON RPC

It turns out that using a custom serializer on an
input stream did not work well. For one the stream seems
to be getting closed before the JSON gets written. But
also the method for writing it was throwing an
UnsupportedOperationException further down in Jackson.

The above simplifies the matter by simply outputting the
Base64 string first and then setting it on the model.

* Add missing files to attachment fix

Co-authored-by: cedb <cedb@keylimebox.org>
src/main/java/org/asamk/signal/commands/GetAttachmentCommand.java
src/main/java/org/asamk/signal/json/JsonAttachmentData.java
src/main/java/org/asamk/signal/json/JsonStreamSerializer.java [deleted file]