25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-20 16:15:59 +01:00

* src/mod_privacy_odbc.erl: Privacy rules support using odbc

* src/odbc/pg.sql: Likewise

* src/web/ejabberd_http_poll.erl: Bugfix

SVN Revision: 660
This commit is contained in:
Alexey Shchepin 2006-10-09 20:32:41 +00:00
parent fa7693d355
commit 95e2726f71
4 changed files with 22 additions and 6 deletions

View File

@ -1,3 +1,12 @@
2006-10-09 Alexey Shchepin <alexey@sevcom.net>
* src/mod_privacy_odbc.erl: Privacy rules support using odbc
* src/odbc/pg.sql: Likewise
2006-10-06 Alexey Shchepin <alexey@sevcom.net>
* src/web/ejabberd_http_poll.erl: Bugfix
2006-10-05 Alexey Shchepin <alexey@sevcom.net>
* src/mod_privacy.erl: Use hooks instead of direct function calls

View File

@ -359,8 +359,8 @@ process_list_set(LUser, LServer, {value, Name}, Els) ->
Error;
{atomic, {result, _} = Res} ->
ejabberd_router:route(
jlib:make_jid(LUser, ?MYNAME, ""),
jlib:make_jid(LUser, ?MYNAME, ""),
jlib:make_jid(LUser, LServer, ""),
jlib:make_jid(LUser, LServer, ""),
{xmlelement, "broadcast", [],
[{privacy_list,
#userlist{name = Name, list = []},

View File

@ -99,7 +99,15 @@ CREATE TABLE privacy_default_list (
CREATE TABLE privacy_list (
username text NOT NULL,
name text NOT NULL,
type character(1) NOT NULL,
id SERIAL UNIQUE
);
CREATE INDEX i_privacy_list_username ON privacy_list USING btree (username);
CREATE UNIQUE INDEX i_privacy_list_username_name ON privacy_list USING btree (username, name);
CREATE TABLE privacy_list_data (
id bigint REFERENCES privacy_list(id) ON DELETE CASCADE,
t character(1) NOT NULL,
value text NOT NULL,
action character(1) NOT NULL,
ord NUMERIC NOT NULL,
@ -110,7 +118,6 @@ CREATE TABLE privacy_list (
match_presence_out boolean NOT NULL
);
CREATE INDEX i_privacy_list_username ON privacy_list USING btree (username);
--- To update from 0.9.8:

View File

@ -189,11 +189,11 @@ handle_event({activate, From}, StateName, StateData) ->
{next_state, StateName,
StateData#state{waiting_input = {From, ok}}};
Input ->
{Receiver, _Tag} = From,
Receiver = From,
Receiver ! {tcp, {http_poll, self()}, list_to_binary(Input)},
{next_state, StateName, StateData#state{input = "",
waiting_input = false,
last_receiver = From
last_receiver = Receiver
}}
end;