Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
briar
briar
Commits
80ee35d9
Verified
Commit
80ee35d9
authored
Nov 27, 2018
by
Torsten Grote
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[core] Return fake mini PNG as Attachment instead of throwing exception
parent
4796902b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
briar-core/src/main/java/org/briarproject/briar/messaging/MessagingManagerImpl.java
...rg/briarproject/briar/messaging/MessagingManagerImpl.java
+7
-1
No files found.
briar-core/src/main/java/org/briarproject/briar/messaging/MessagingManagerImpl.java
View file @
80ee35d9
...
...
@@ -32,6 +32,7 @@ import org.briarproject.briar.api.messaging.PrivateMessageHeader;
import
org.briarproject.briar.api.messaging.event.PrivateMessageReceivedEvent
;
import
org.briarproject.briar.client.ConversationClientImpl
;
import
java.io.ByteArrayInputStream
;
import
java.io.InputStream
;
import
java.util.ArrayList
;
import
java.util.Collection
;
...
...
@@ -42,6 +43,7 @@ import javax.annotation.concurrent.Immutable;
import
javax.inject.Inject
;
import
static
java
.
util
.
Collections
.
emptyList
;
import
static
org
.
briarproject
.
bramble
.
util
.
StringUtils
.
fromHexString
;
import
static
org
.
briarproject
.
briar
.
client
.
MessageTrackerConstants
.
MSG_KEY_READ
;
@Immutable
...
...
@@ -237,7 +239,11 @@ class MessagingManagerImpl extends ConversationClientImpl
@Override
public
Attachment
getAttachment
(
MessageId
m
)
{
// TODO add real implementation
throw
new
IllegalStateException
(
"Not yet implemented"
);
byte
[]
bytes
=
fromHexString
(
"89504E470D0A1A0A0000000D49484452"
+
"000000010000000108060000001F15C4"
+
"890000000A49444154789C6300010000"
+
"0500010D0A2DB40000000049454E44AE426082"
);
return
new
Attachment
(
new
ByteArrayInputStream
(
bytes
));
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment