mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-26 17:38:45 +01:00
Merge pull request #1165 from weiss/default-blocking-list
mod_blocking_sql: Handle default list corner case
This commit is contained in:
commit
e54400a8e4
@ -25,7 +25,12 @@ process_blocklist_block(LUser, LServer, Filter) ->
|
|||||||
Default = case mod_privacy_sql:sql_get_default_privacy_list_t(LUser) of
|
Default = case mod_privacy_sql:sql_get_default_privacy_list_t(LUser) of
|
||||||
{selected, []} ->
|
{selected, []} ->
|
||||||
Name = <<"Blocked contacts">>,
|
Name = <<"Blocked contacts">>,
|
||||||
mod_privacy_sql:sql_add_privacy_list(LUser, Name),
|
case mod_privacy_sql:sql_get_privacy_list_id_t(LUser, Name) of
|
||||||
|
{selected, []} ->
|
||||||
|
mod_privacy_sql:sql_add_privacy_list(LUser, Name);
|
||||||
|
{selected, [{_ID}]} ->
|
||||||
|
ok
|
||||||
|
end,
|
||||||
mod_privacy_sql:sql_set_default_privacy_list(LUser, Name),
|
mod_privacy_sql:sql_set_default_privacy_list(LUser, Name),
|
||||||
Name;
|
Name;
|
||||||
{selected, [{Name}]} -> Name
|
{selected, [{Name}]} -> Name
|
||||||
|
Loading…
Reference in New Issue
Block a user