Software /
code /
prosody
Diff
core/storagemanager.lua @ 7644:90a4790c2329
storagemanager: Fire event when opening a store, and allow the returned store/err to be overridden
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 31 Aug 2016 11:50:41 +0100 |
parent | 7643:44fe2aaf817e |
child | 7645:d7b1bc069c12 |
line wrap: on
line diff
--- a/core/storagemanager.lua Wed Aug 31 11:45:06 2016 +0100 +++ b/core/storagemanager.lua Wed Aug 31 11:50:41 2016 +0100 @@ -161,6 +161,11 @@ end end end + if ret then + local event_data = { host = host, store_name = store, store_type = typ, store = ret }; + prosody.hosts[host].fire_event("store-opened", event_data); + ret, err = event_data.store, event_data.store_err; + end return ret, err; end