Conversation
await_notification()
|
My problems seem to come from a bad implementation of NOTIFY in the server I have tested with. It looks like a bit of research is necessary to find out the least common denominator for the command syntax that can be used, or a series of fallbacks to appease the lesser capable NOTIFY implementations. I've even come across a server that announces the NOTIFY extension, accepts the NOTIFY command, but does not give out any notifications. For this reason, it might be prudent to give more control to the user than I have done so far. The NOTIFY command syntax is complicated, what level of 'expertise' can we demand from the users should we go down this route? Alternatively, we can provide a series of fallbacks, but at that point we might be better off just offering IMAP IDLE support, as it currently is. |
I've made a first cut at IMAP NOTIFY support.
It works for me, at least sometimes, other times it returns early, and end up in a tight loop.
It is largely modeled on the included IMAP IDLE implementation, and provides a
await_notification()Lua function.Where
enter_idlesendsDONE / IDLEon timeout, await_notification sendsNOOPrequests.I'm making this pull request to get feedback on the direction.
The Lua is copied from
enter_idleand probably needs a good looking at.