mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 02:20:39 +00:00
When sending an end session message clear local session store also if sending message fails
This commit is contained in:
parent
19b01ff2e9
commit
08749fcee0
1 changed files with 9 additions and 1 deletions
|
@ -732,7 +732,15 @@ public class Manager implements Signal {
|
|||
SignalServiceDataMessage.Builder messageBuilder = SignalServiceDataMessage.newBuilder()
|
||||
.asEndSessionMessage();
|
||||
|
||||
sendMessageLegacy(messageBuilder, getSignalServiceAddresses(recipients));
|
||||
final Collection<SignalServiceAddress> signalServiceAddresses = getSignalServiceAddresses(recipients);
|
||||
try {
|
||||
sendMessageLegacy(messageBuilder, signalServiceAddresses);
|
||||
} catch (Exception e) {
|
||||
for (SignalServiceAddress address : signalServiceAddresses) {
|
||||
handleEndSession(address);
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue