X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/224d8194cc4f6cd91dfdeb71703b75ef67e0b208..2d068997c50e8e75e378e9f0202aa14de3a140a8:/lib/src/main/java/org/asamk/signal/manager/HandleAction.java diff --git a/lib/src/main/java/org/asamk/signal/manager/HandleAction.java b/lib/src/main/java/org/asamk/signal/manager/HandleAction.java index 7fb80c34..08f51590 100644 --- a/lib/src/main/java/org/asamk/signal/manager/HandleAction.java +++ b/lib/src/main/java/org/asamk/signal/manager/HandleAction.java @@ -187,3 +187,32 @@ class RetrieveProfileAction implements HandleAction { return recipientId.hashCode(); } } + +class RenewSessionAction implements HandleAction { + + private final RecipientId recipientId; + + public RenewSessionAction(final RecipientId recipientId) { + this.recipientId = recipientId; + } + + @Override + public void execute(Manager m) throws Throwable { + m.renewSession(recipientId); + } + + @Override + public boolean equals(final Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + final RenewSessionAction that = (RenewSessionAction) o; + + return recipientId.equals(that.recipientId); + } + + @Override + public int hashCode() { + return recipientId.hashCode(); + } +}