mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Handle end session messages
This commit is contained in:
parent
01702276c5
commit
1b0df2c7e7
3 changed files with 10 additions and 7 deletions
|
@ -188,9 +188,11 @@ public class Main {
|
|||
} else {
|
||||
if (content.getDataMessage().isPresent()) {
|
||||
TextSecureDataMessage message = content.getDataMessage().get();
|
||||
|
||||
System.out.println("Body: " + message.getBody().get());
|
||||
if (message.getAttachments().isPresent()) {
|
||||
|
||||
if (message.isEndSession()) {
|
||||
m.handleEndSession(envelope.getSource());
|
||||
} else if (message.getAttachments().isPresent()) {
|
||||
System.out.println("Attachments: ");
|
||||
for (TextSecureAttachment attachment : message.getAttachments().get()) {
|
||||
System.out.println("- " + attachment.getContentType() + " (" + (attachment.isPointer() ? "Pointer" : "") + (attachment.isStream() ? "Stream" : "") + ")");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue