diff --git a/mod_push_offline/src/mod_push_offline.erl b/mod_push_offline/src/mod_push_offline.erl index cb2bf3a..735c34d 100644 --- a/mod_push_offline/src/mod_push_offline.erl +++ b/mod_push_offline/src/mod_push_offline.erl @@ -106,7 +106,7 @@ notify(#jid{lserver = LServer} = To, Pkt) -> UnWrappedPkt = unwrap_message(Pkt), DelayedPkt = add_delay_info(UnWrappedPkt, LServer, undefined), Id = p1_rand:get_string(), - PushServer = mod_push_modified_opt:host(LServer), + PushServer = mod_push_offline_opt:host(LServer), WrappedPacket = wrap(DelayedPkt, <<"urn:xmpp:push:nodes:messages">>, Id), ejabberd_router:route(xmpp:set_from_to(WrappedPacket, To, jid:make(PushServer))). diff --git a/mod_push_offline/src/mod_push_offline_opt.erl b/mod_push_offline/src/mod_push_offline_opt.erl new file mode 100644 index 0000000..824ffa4 --- /dev/null +++ b/mod_push_offline/src/mod_push_offline_opt.erl @@ -0,0 +1,9 @@ +-module(mod_push_offline_opt). + +-export([host/1]). + +-spec host(gen_mod:opts() | global | binary()) -> binary(). +host(Opts) when is_map(Opts) -> + gen_mod:get_opt(host, Opts); +host(Host) -> + gen_mod:get_module_opt(Host, mod_push_offline, host).