From a6b3ceccbf40a694b315947b1ee638cd2dc21cc5 Mon Sep 17 00:00:00 2001 From: Badlop Date: Sun, 7 Feb 2021 23:49:53 +0100 Subject: [PATCH] Revert "Update mod_post_log parsing url option, so it starts with recent ejabberd" This reverts commit 21d78a74c1a71d3523ce7129adc16646efe9ef4e. --- mod_post_log/src/mod_post_log.erl | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/mod_post_log/src/mod_post_log.erl b/mod_post_log/src/mod_post_log.erl index 55cb36b..66af7a8 100644 --- a/mod_post_log/src/mod_post_log.erl +++ b/mod_post_log/src/mod_post_log.erl @@ -42,10 +42,7 @@ stop(Host) -> depends(_Host, _Opts) -> []. -mod_opt_type(url) -> - fun(Val) when is_binary(Val) -> binary_to_list(Val); - (Val) -> Val - end; +mod_opt_type(url) -> fun binary_to_list/1; mod_opt_type(ts_header) -> fun binary_to_list/1; mod_opt_type(from_header) -> fun binary_to_list/1; mod_opt_type(to_header) -> fun binary_to_list/1; @@ -56,11 +53,11 @@ mod_opt_type(req_options) -> fun(L) when is_list(L) -> L end. mod_options(_Host) -> [{url, undefined}, - {ts_header, <<"X-Message-Timestamp">>}, - {from_header, <<"X-Message-From">>}, - {to_header, <<"X-Message-To">>}, + {ts_header, "X-Message-Timestamp"}, + {from_header, "X-Message-From"}, + {to_header, "X-Message-To"}, {headers, []}, - {content_type, <<"text/xml">>}, + {content_type, "text/xml"}, {http_options, []}, {req_options, []}].