wa-automate-nodejs icon indicating copy to clipboard operation
wa-automate-nodejs copied to clipboard

Update patches without restarting session 🪄🔄

Open smashah opened this issue 2 years ago • 2 comments

live patches

smashah avatar May 19 '22 00:05 smashah

Idea: Check every X (30?) minute for an Update Download the new update while runtime (maybe with an event? onPatchUpdate()) in that event users could use client.applyNewPatch() or you force the new Patch with the popup stuff coming from whatsapp itself where you need to inject again anyway (just delete me if you had already ideas how to do this)

t0g3pii avatar Sep 06 '22 20:09 t0g3pii

I was thinking along the lines of:

  • every time the patches are update it sends an mqtt event to your sessions which fires an event
  • and/or there's an endpoint https://patches.openwa.dev/hash which simply returns the current patch hash - if it is different then it fires an event (problem then is that the result of the endpoint itself will most likely be cached)
  • and/or listen to a keyboard event (e.g p) which will then trigger a manual session re-patch.
  • and/or create a function that will re-patch your session based on your own use cases

I thought this was a nice-to-have but with recent concerning reports about long launch times I might have to prioritise this.

One downside is that every re-patch will require a new license request. So that latency also needs to be taken into consideration.

smashah avatar Sep 07 '22 09:09 smashah