Add option to store offline message to MySQL or other DB
Hi Thomas, thanks for filing this featue request!
I'd be interested to know more about how you would use this feature. Ultimately: why do you want it?
for example i can use with two server for delivery the offline message or if one server is down i can start an other without lost
Say when you are using it for an in-app chat application and the user has not opened the app. We could use the data in the table to notify the user that he has messages to be viewed. Lets say a GCM or an APNS notification.
And also all modlus use sql storage, i think also this must be for standard
Praveen: the correct way to implement that would be through a Prosody module that hooks the "message/offline/handle" event. See mod_offline_email in prosody-modules for an example of this (which "pushes" offline messages over email). Polling the database would be inefficient.
Thomas: For the multiple server use-case: this isn't really reliable until Prosody implements clustering, and when it does, I doubt it will depend on SQL.
In general: I'm not 100% sure that every kind of data is suitable for storage in an SQL database. Yes, it *can* be done, but that doesn't make it a good idea... :)
That said, we are planning to move offline messages to our archive storage API (the same one used by MAM), and since mod_storage_sql supports that, you'll be able to store offline messages there if you want.