diff --git a/priv/msgs/nl.msg b/priv/msgs/nl.msg
-index 8bb1c0eb..22c83f20 100644
+index 9dfd896b..f35ff07a 100644
--- a/priv/msgs/nl.msg
+++ b/priv/msgs/nl.msg
-@@ -426,3 +426,17 @@
+@@ -386,3 +386,17 @@
{"Your Jabber account was successfully created.","Uw Jabber-account is succesvol gecreeerd."}.
{"Your Jabber account was successfully deleted.","Uw Jabber-account is succesvol verwijderd."}.
{"Your messages to ~s are being blocked. To unblock them, visit ~s","Uw berichten aan ~s worden geblokkeerd. Om ze te deblokkeren, ga naar ~s"}.
+{"Body", "Berichtveld"}.
+{"Messages", "Berichten"}.
diff --git a/priv/msgs/pl.msg b/priv/msgs/pl.msg
-index 03fbd3d0..89d09f34 100644
+index 6b303cc9..664f1c95 100644
--- a/priv/msgs/pl.msg
+++ b/priv/msgs/pl.msg
-@@ -438,3 +438,29 @@
+@@ -390,3 +390,29 @@
{"Your Jabber account was successfully created.","Twoje konto zostało stworzone."}.
{"Your Jabber account was successfully deleted.","Twoje konto zostało usunięte."}.
{"Your messages to ~s are being blocked. To unblock them, visit ~s","Twoje wiadomości do ~s są blokowane. Aby je odblokować, odwiedź ~s"}.
+{"Purge messages older than (days)", "Usuń wiadomości starsze niż (w dniach)"}.
+{"Poll users settings (seconds)", "Czas aktualizacji preferencji użytkowników (sekundy)"}.
diff --git a/priv/msgs/ru.msg b/priv/msgs/ru.msg
-index 7acab78f..18af522a 100644
+index 05849f51..b87bf9bb 100644
--- a/priv/msgs/ru.msg
+++ b/priv/msgs/ru.msg
-@@ -426,3 +426,33 @@
+@@ -386,3 +386,33 @@
{"Your Jabber account was successfully created.","Ваш Jabber-аккаунт был успешно создан."}.
{"Your Jabber account was successfully deleted.","Ваш Jabber-аккаунт был успешно удален."}.
{"Your messages to ~s are being blocked. To unblock them, visit ~s","Ваши сообщения к ~s блокируются. Для снятия блокировки перейдите по ссылке ~s"}.
+{"Do not drop", "Не удалять"}.
+{"Drop messages on user removal", "Удалять сообщения при удалении пользователя"}.
diff --git a/priv/msgs/uk.msg b/priv/msgs/uk.msg
-index 568ac092..3a324ed1 100644
+index a1159b53..4bdab4c5 100644
--- a/priv/msgs/uk.msg
+++ b/priv/msgs/uk.msg
-@@ -438,3 +438,33 @@
+@@ -390,3 +390,33 @@
{"Your Jabber account was successfully created.","Ваш Jabber-акаунт було успішно створено."}.
{"Your Jabber account was successfully deleted.","Ваш Jabber-акаунт було успішно видалено."}.
{"Your messages to ~s are being blocked. To unblock them, visit ~s","Ваші повідомлення до ~s блокуються. Для розблокування відвідайте ~s"}.
+{"Do not drop", "Не видаляти"}.
+{"Drop messages on user removal", "Видаляти повідомлення під час видалення користувача"}.
diff --git a/rebar.config b/rebar.config
-index aef3a017..b35db36f 100644
+index 477343c5..db58ab69 100644
--- a/rebar.config
+++ b/rebar.config
@@ -33,8 +33,8 @@
- {eimp, ".*", {git, "https://github.com/processone/eimp", {tag, "1.0.5"}}},
- {if_var_true, stun, {stun, ".*", {git, "https://github.com/processone/stun", {tag, "1.0.21"}}}},
- {if_var_true, sip, {esip, ".*", {git, "https://github.com/processone/esip", {tag, "1.0.23"}}}},
+ {eimp, ".*", {git, "https://github.com/processone/eimp", {tag, "1.0.8"}}},
+ {if_var_true, stun, {stun, ".*", {git, "https://github.com/processone/stun", {tag, "1.0.25"}}}},
+ {if_var_true, sip, {esip, ".*", {git, "https://github.com/processone/esip", {tag, "1.0.26"}}}},
- {if_var_true, mysql, {p1_mysql, ".*", {git, "https://github.com/processone/p1_mysql",
-- {tag, "1.0.5"}}}},
+- {tag, "1.0.7"}}}},
+ {if_var_true, mysql, {p1_mysql, ".*", {git, "https://github.com/paleg/p1_mysql",
+ {branch, "multi"}}}},
{if_var_true, pgsql, {p1_pgsql, ".*", {git, "https://github.com/processone/p1_pgsql",
- {tag, "1.1.5"}}}},
+ {tag, "1.1.6"}}}},
{if_var_true, sqlite, {sqlite3, ".*", {git, "https://github.com/processone/erlang-sqlite3",
diff --git a/src/gen_logdb.erl b/src/gen_logdb.erl
new file mode 100644
+ undefined.
diff --git a/src/mod_logdb.erl b/src/mod_logdb.erl
new file mode 100644
-index 00000000..d5983820
+index 00000000..bf0240d1
--- /dev/null
+++ b/src/mod_logdb.erl
-@@ -0,0 +1,1952 @@
+@@ -0,0 +1,1951 @@
+%%%----------------------------------------------------------------------
+%%% File : mod_logdb.erl
+%%% Author : Oleg Palij (mailto:o.palij@gmail.com)
+ user_messages_stats_at/5]).
+
+-include("mod_logdb.hrl").
-+-include("ejabberd.hrl").
+-include("xmpp.hrl").
+-include("mod_roster.hrl").
+-include("ejabberd_commands.hrl").
+ {<<"checked">>, <<"true">>}])).
diff --git a/src/mod_logdb_mnesia.erl b/src/mod_logdb_mnesia.erl
new file mode 100644
-index 00000000..ea167d88
+index 00000000..a08d5262
--- /dev/null
+++ b/src/mod_logdb_mnesia.erl
-@@ -0,0 +1,555 @@
+@@ -0,0 +1,553 @@
+%%%----------------------------------------------------------------------
+%%% File : mod_logdb_mnesia.erl
+%%% Author : Oleg Palij (mailto:o.palij@gmail.com)
+-author('o.palij@gmail.com').
+
+-include("mod_logdb.hrl").
-+-include("ejabberd.hrl").
-+-include("jlib.hrl").
+-include("logger.hrl").
+
+-behaviour(gen_logdb).
+ {record_name, msg}]).
diff --git a/src/mod_logdb_mysql.erl b/src/mod_logdb_mysql.erl
new file mode 100644
-index 00000000..09036211
+index 00000000..21d65e65
--- /dev/null
+++ b/src/mod_logdb_mysql.erl
-@@ -0,0 +1,1052 @@
+@@ -0,0 +1,1050 @@
+%%%----------------------------------------------------------------------
+%%% File : mod_logdb_mysql.erl
+%%% Author : Oleg Palij (mailto:o.palij@gmail.com)
+-author('o.palij@gmail.com').
+
+-include("mod_logdb.hrl").
-+-include("ejabberd.hrl").
-+-include("jlib.hrl").
+-include("logger.hrl").
+
+-behaviour(gen_logdb).
+ {error, Reason}.
diff --git a/src/mod_logdb_mysql5.erl b/src/mod_logdb_mysql5.erl
new file mode 100644
-index 00000000..b6025a3d
+index 00000000..c05ab958
--- /dev/null
+++ b/src/mod_logdb_mysql5.erl
-@@ -0,0 +1,981 @@
+@@ -0,0 +1,979 @@
+%%%----------------------------------------------------------------------
+%%% File : mod_logdb_mysql5.erl
+%%% Author : Oleg Palij (mailto:o.palij@gmail.com)
+-author('o.palij@gmail.com').
+
+-include("mod_logdb.hrl").
-+-include("ejabberd.hrl").
-+-include("jlib.hrl").
+-include("logger.hrl").
+
+-behaviour(gen_logdb).
+END;", [logmessage_name(VHost),UName,UName,UName,UName,SName,SName,RName,RName,UName,UName,SName,RName,StName,StName]).
diff --git a/src/mod_logdb_pgsql.erl b/src/mod_logdb_pgsql.erl
new file mode 100644
-index 00000000..61a71fff
+index 00000000..202c6ed4
--- /dev/null
+++ b/src/mod_logdb_pgsql.erl
-@@ -0,0 +1,1106 @@
+@@ -0,0 +1,1104 @@
+% {ok, DBRef} = pgsql:connect([{host, "127.0.0.1"}, {database, "logdb"}, {user, "logdb"}, {password, "logdb"}, {port, 5432}, {as_binary, true}]).
+% Schema = "test".
+% pgsql:squery(DBRef, "CREATE TABLE test.\"logdb_stats_test\" (owner_id INTEGER, peer_name_id INTEGER, peer_server_id INTEGER, at VARCHAR(20), count integer);" ).
+-author('o.palij@gmail.com').
+
+-include("mod_logdb.hrl").
-+-include("ejabberd.hrl").
-+-include("jlib.hrl").
+-include("logger.hrl").
+
+-behaviour(gen_logdb).
+ {error, undefined, Rez}.
+
diff --git a/src/mod_roster.erl b/src/mod_roster.erl
-index cf281528..c3a5c92a 100644
+index 38c3a78b..f02f2cd3 100644
--- a/src/mod_roster.erl
+++ b/src/mod_roster.erl
-@@ -65,6 +65,8 @@
-
- -define(SETS, gb_sets).
+@@ -66,6 +66,8 @@
+ -define(ROSTER_ITEM_CACHE, roster_item_cache).
+ -define(ROSTER_VERSION_CACHE, roster_version_cache).
+-include("mod_logdb.hrl").
+
-export_type([subscription/0]).
-callback init(binary(), gen_mod:opts()) -> any().
-@@ -943,6 +945,14 @@ user_roster(User, Server, Query, Lang) ->
+@@ -911,6 +913,14 @@ user_roster(User, Server, Query, Lang) ->
Query),
Items = get_roster(LUser, LServer),
SItems = lists:sort(Items),
FItems = case SItems of
[] -> [?CT(<<"None">>)];
_ ->
-@@ -1000,7 +1010,33 @@ user_roster(User, Server, Query, Lang) ->
+@@ -968,7 +978,33 @@ user_roster(User, Server, Query, Lang) ->
[?INPUTT(<<"submit">>,
<<"remove",
(ejabberd_web_admin:term_to_id(R#roster.jid))/binary>>,
end,
SItems)))])]
end,
-@@ -1107,9 +1143,42 @@ user_roster_item_parse_query(User, Server, Items,
+@@ -1075,9 +1111,42 @@ user_roster_item_parse_query(User, Server, Items,
sub_els = [#roster_query{
items = [RosterItem]}]}),
throw(submitted);
end,
Items),
nothing.
+
Summary: Fault-tolerant distributed Jabber/XMPP server
Summary(pl.UTF-8): Odporny na awarie rozproszony serwer Jabbera/XMPP
Name: ejabberd
-Version: 18.04
-Release: 3
+Version: 18.09
+Release: 1
License: GPL
Group: Applications/Communications
Source0: http://www.process-one.net/downloads/ejabberd/%{version}/%{name}-%{version}.tgz
-# Source0-md5: bd82d63fc4eb0931b7f3da0a2847772e
+# Source0-md5: f9a49230810c94328a0dc01c63a24b22
Source1: %{name}.init
Source2: %{name}.sysconfig
Source3: %{name}.service
Source4: %{name}.logrotate
#
# Archives created with the ejabberd-pack_deps.sh script (in this repo)
-Source10: ejabberd-base64url-20150806.tar.gz
-# Source10-md5: afa75062e6e007cb756d98d5ca666b42
-Source11: ejabberd-cache_tab-20180322.tar.gz
-# Source11-md5: 9f14ec8529265206436fed4b4a0ca55c
-Source12: ejabberd-eimp-20180425.tar.gz
-# Source12-md5: 76860dfd63eec9ecebe19735a1079b23
-Source13: ejabberd-elixir-20170515.tar.gz
-# Source13-md5: 7d60cb822a5d7d3ed8f1daefe63e7b5c
-Source14: ejabberd-ezlib-20180322.tar.gz
-# Source14-md5: 13e8dc5d7256f9081eb30ccb97ddbb53
-Source15: ejabberd-fast_tls-20180425.tar.gz
-# Source15-md5: 2805e9185d94dc3da231429b68875d9f
-Source16: ejabberd-fast_xml-20180425.tar.gz
-# Source16-md5: aad0a6b1fb3fb4f81929c7eb02565c96
-Source17: ejabberd-fast_yaml-20180425.tar.gz
-# Source17-md5: 39eef0ecd77cf4144277408b8764deaa
-Source18: ejabberd-goldrush-20160531.tar.gz
-# Source18-md5: cce5aa7bdd2a25ad1cf642b2a3eedd53
-Source19: ejabberd-iconv-20180322.tar.gz
-# Source19-md5: 851afe38b6ffdad1e2584d810ae2f5a1
-Source20: ejabberd-jiffy-20160331.tar.gz
-# Source20-md5: 0e69e8668ff84e16cc98e95eb57a7687
-Source21: ejabberd-jose-20170518.tar.gz
-# Source21-md5: 523f534504d4fea2dbd052ceaea6dec0
-Source22: ejabberd-lager-20170426.tar.gz
-# Source22-md5: 3d91b8e70c10987f8ac549d2e595d631
-Source23: ejabberd-p1_mysql-20170928.tar.gz
-# Source23-md5: 64c6a4b133da0a4b0b3c7f317196397d
-Source24: ejabberd-p1_oauth2-20180425.tar.gz
-# Source24-md5: 1e53045cf956aba979d3f1324f8768b6
-Source25: ejabberd-p1_pgsql-20180322.tar.gz
-# Source25-md5: 40ef5abf21f568b9b195ed0cf4b69946
-Source26: ejabberd-p1_utils-20180322.tar.gz
-# Source26-md5: 322b2d2c8a48570c454af5baed1ac4c0
-Source27: ejabberd-rebar_elixir_plugin-20160105.tar.gz
-# Source27-md5: 9382b37f25d3727edf657bda1af1cc32
-Source28: ejabberd-stringprep-20180322.tar.gz
-# Source28-md5: 92c43f65099e812a11f4a9536b4e71ab
-Source29: ejabberd-xmpp-20180425.tar.gz
-# Source29-md5: 6e43cfd60dc1a899f690bc25f63b172a
+Source10: ejabberd-base64url-20150806.tar.gz
+# Source10-md5: 6173689227956f8a60951a8791facf31
+Source11: ejabberd-cache_tab-20180924.tar.gz
+# Source11-md5: 69965f1816be4f708e259f24a973e502
+Source12: ejabberd-eimp-20180924.tar.gz
+# Source12-md5: c920c320c8512bdbb31a2e834b02ca7d
+Source13: ejabberd-elixir-20170515.tar.gz
+# Source13-md5: 4a637973eab83b07e8cc4b24564c0f5c
+Source14: ejabberd-ezlib-20180322.tar.gz
+# Source14-md5: e36b09a55a7d972694fcd24882da05c7
+Source15: ejabberd-fast_tls-20180924.tar.gz
+# Source15-md5: d369c70c9ae7e89680d1c909a46e2087
+Source16: ejabberd-fast_xml-20180924.tar.gz
+# Source16-md5: 65c980e9a77f00b8a1a0357f51a3ed38
+Source17: ejabberd-fast_yaml-20180924.tar.gz
+# Source17-md5: 0d419e5b6694ed6410e6258a2f4c9b47
+Source18: ejabberd-goldrush-20160531.tar.gz
+# Source18-md5: 06ec6d9ff4686590716b8b017504a16f
+Source19: ejabberd-iconv-20180924.tar.gz
+# Source19-md5: 8b19bcd50a7158b21d8527fe7a757590
+Source20: ejabberd-jiffy-20160331.tar.gz
+# Source20-md5: 5870143655d179e584c66048939d1e90
+Source21: ejabberd-jose-20170518.tar.gz
+# Source21-md5: 5fcabb971cb0aed4cfdd8ffb29da8b2b
+Source22: ejabberd-lager-20180903.tar.gz
+# Source22-md5: 2002e520d7b3de16658d0f350e7ebb89
+Source23: ejabberd-p1_mysql-20180723.tar.gz
+# Source23-md5: 2cb927e43c1ce1c2009a69da0aebeff4
+Source24: ejabberd-p1_oauth2-20180425.tar.gz
+# Source24-md5: 16883be155a73786d504a1ed9dcb4d40
+Source25: ejabberd-p1_pgsql-20180628.tar.gz
+# Source25-md5: 9b41c1653f583812a5d22890ac364baa
+Source26: ejabberd-p1_utils-20180924.tar.gz
+# Source26-md5: 5f94c266a3fe2ededfaedfbd612d80bf
+Source27: ejabberd-rebar_elixir_plugin-20160105.tar.gz
+# Source27-md5: 080553b9e073ca3f3622432ea03ad1c3
+Source28: ejabberd-stringprep-20180924.tar.gz
+# Source28-md5: c12bd4c434e423ef93b87f6b26bd635c
+Source29: ejabberd-xmpp-20180925.tar.gz
+# Source29-md5: dd9a94fab67c516bffbcd0845819b8d4
Patch0: %{name}-paths.patch
Patch1: %{name}-config.patch
# https://paleg.github.io/mod_logdb/
-# https://github.com/paleg/ejabberd/tree/17.04-mod_logdb
+# https://github.com/paleg/ejabberd/tree/18.06-mod_logdb
Patch3: %{name}-mod_logdb.patch
URL: http://www.ejabberd.im/
BuildRequires: autoconf