mirror of
https://github.com/processone/ejabberd
synced 2025-10-03 01:39:35 +02:00
Compare commits
9 commits
74c810eeaa
...
6d63842ad3
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6d63842ad3 | ||
![]() |
2f3b9015e9 | ||
![]() |
6ae48eb991 | ||
![]() |
c508795ad4 | ||
![]() |
4a053807e0 | ||
![]() |
dd5bbda2dc | ||
![]() |
98469678a0 | ||
![]() |
b8550e087e | ||
![]() |
644d468b4f |
16 changed files with 137 additions and 20 deletions
2
.github/container/Dockerfile
vendored
2
.github/container/Dockerfile
vendored
|
@ -9,7 +9,7 @@ ARG VERSION='master'
|
|||
|
||||
################################################################################
|
||||
#' Compile ejabberdapi
|
||||
FROM docker.io/golang:1.24-alpine AS api
|
||||
FROM docker.io/golang:1.25-alpine AS api
|
||||
RUN go install -v \
|
||||
github.com/processone/ejabberd-api/cmd/ejabberd@master \
|
||||
&& mv bin/ejabberd bin/ejabberdapi
|
||||
|
|
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -35,7 +35,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Test shell scripts
|
||||
if: matrix.otp == '27'
|
||||
|
|
4
.github/workflows/container.yml
vendored
4
.github/workflows/container.yml
vendored
|
@ -22,12 +22,12 @@ jobs:
|
|||
packages: write
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Checkout ejabberd-contrib
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
repository: processone/ejabberd-contrib
|
||||
path: .ejabberd-modules/sources/ejabberd-contrib
|
||||
|
|
2
.github/workflows/installers.yml
vendored
2
.github/workflows/installers.yml
vendored
|
@ -41,7 +41,7 @@ jobs:
|
|||
gem install --no-document --user-install fpm
|
||||
echo $HOME/.local/share/gem/ruby/*/bin >> $GITHUB_PATH
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Build binary archives
|
||||
|
|
6
.github/workflows/runtime.yml
vendored
6
.github/workflows/runtime.yml
vendored
|
@ -46,7 +46,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Get old compatible Rebar binaries
|
||||
if: matrix.otp < 24
|
||||
|
@ -186,7 +186,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Prepare libraries
|
||||
run: |
|
||||
|
@ -309,7 +309,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Prepare libraries
|
||||
run: |
|
||||
|
|
2
mix.lock
2
mix.lock
|
@ -1,7 +1,7 @@
|
|||
%{
|
||||
"base64url": {:hex, :base64url, "1.0.1", "f8c7f2da04ca9a5d0f5f50258f055e1d699f0e8bf4cfdb30b750865368403cf6", [:rebar3], [], "hexpm", "f9b3add4731a02a9b0410398b475b33e7566a695365237a6bdee1bb447719f5c"},
|
||||
"cache_tab": {:hex, :cache_tab, "1.0.33", "e2542afb34f17ee3ca19d2b0f546a074922c2b99fb6b2acfb38160d7d0336ec3", [:rebar3], [{:p1_utils, "1.0.28", [hex: :p1_utils, repo: "hexpm", optional: false]}], "hexpm", "4258009eb050b22aabe0c848e230bba58401a6895c58c2ff74dfb635e3c35900"},
|
||||
"dialyxir": {:hex, :dialyxir, "1.4.5", "ca1571ac18e0f88d4ab245f0b60fa31ff1b12cbae2b11bd25d207f865e8ae78a", [:mix], [{:erlex, ">= 0.2.7", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "b0fb08bb8107c750db5c0b324fa2df5ceaa0f9307690ee3c1f6ba5b9eb5d35c3"},
|
||||
"dialyxir": {:hex, :dialyxir, "1.4.6", "7cca478334bf8307e968664343cbdb432ee95b4b68a9cba95bdabb0ad5bdfd9a", [:mix], [{:erlex, ">= 0.2.7", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "8cf5615c5cd4c2da6c501faae642839c8405b49f8aa057ad4ae401cb808ef64d"},
|
||||
"earmark_parser": {:hex, :earmark_parser, "1.4.44", "f20830dd6b5c77afe2b063777ddbbff09f9759396500cdbe7523efd58d7a339c", [:mix], [], "hexpm", "4778ac752b4701a5599215f7030989c989ffdc4f6df457c5f36938cc2d2a2750"},
|
||||
"eimp": {:hex, :eimp, "1.0.26", "c0b05f32e35629c4d9bcfb832ff879a92b0f92b19844bc7835e0a45635f2899a", [:rebar3], [{:p1_utils, "~> 1.0.25", [hex: :p1_utils, repo: "hexpm", optional: false]}], "hexpm", "d96d4e8572b9dfc40f271e47f0cb1d8849373bc98a21223268781765ed52044c"},
|
||||
"epam": {:hex, :epam, "1.0.14", "aa0b85d27f4ef3a756ae995179df952a0721237e83c6b79d644347b75016681a", [:rebar3], [], "hexpm", "2f3449e72885a72a6c2a843f561add0fc2f70d7a21f61456930a547473d4d989"},
|
||||
|
|
|
@ -358,7 +358,7 @@
|
|||
{"Too many child elements","Túl sok gyermekelem"}.
|
||||
{"Too many <item/> elements","Túl sok <item/> elem"}.
|
||||
{"Too many <list/> elements","Túl sok <list/> elem"}.
|
||||
{"Too many (~p) failed authentications from this IP address (~s). The address will be unblocked at ~s UTC","Túl sok (~p) sikertelen hitelesítés erről az IP-címről (~ts) A cím ~ts-kor lesz feloldva UTC szerint"}.
|
||||
{"Too many (~p) failed authentications from this IP address (~s). The address will be unblocked at ~s UTC","Túl sok (~p) sikertelen hitelesítés erről az IP-címről (~s) A cím ~s-kor lesz feloldva UTC szerint"}.
|
||||
{"Too many receiver fields were specified","Túl sok fogadómező lett meghatározva"}.
|
||||
{"Too many unacked stanzas","Túl sok nyugtázatlan stanza"}.
|
||||
{"Too many users in this conference","Túl sok felhasználó ebben a konferenciában"}.
|
||||
|
|
|
@ -1155,7 +1155,7 @@ get_commands_spec() ->
|
|||
"do not attempt to run this command when ejabberd is running. "
|
||||
"This command is exclusive for the ejabberdctl command-line script, "
|
||||
"don't attempt to execute it using any other API frontend.",
|
||||
note = "added in 25.xx",
|
||||
note = "added in 25.08",
|
||||
args = [{old_node_name, string}],
|
||||
args_desc = ["Old erlang node name"],
|
||||
args_example = ["ejabberd@oldmachine"]},
|
||||
|
|
|
@ -223,7 +223,8 @@ setup_provisional_udsocket_dir(DefinitivePath) ->
|
|||
ProvisionalPathAbsolute.
|
||||
|
||||
get_provisional_udsocket_path(Path) ->
|
||||
PathBase64 = misc:term_to_base64(Path),
|
||||
ReproducibleSecret = binary:part(crypto:hash(sha, misc:atom_to_binary(erlang:get_cookie())), 1, 8),
|
||||
PathBase64 = misc:term_to_base64({ReproducibleSecret, Path}),
|
||||
PathBuild = filename:join(misc:get_home(), PathBase64),
|
||||
DestPath = filename:join(filename:dirname(Path), PathBase64),
|
||||
case {byte_size(DestPath) > 107, byte_size(PathBuild) > 107} of
|
||||
|
@ -243,7 +244,7 @@ get_definitive_udsocket_path(<<"unix", _>> = Unix) ->
|
|||
Unix;
|
||||
get_definitive_udsocket_path(ProvisionalPath) ->
|
||||
PathBase64 = filename:basename(ProvisionalPath),
|
||||
{term, Path} = misc:base64_to_term(PathBase64),
|
||||
{term, {_, Path}} = misc:base64_to_term(PathBase64),
|
||||
relative_socket_to_mnesia(Path).
|
||||
|
||||
-spec set_definitive_udsocket(integer() | binary(), opts()) -> ok | {error, file:posix() | badarg}.
|
||||
|
|
|
@ -275,7 +275,7 @@ get_commands_spec() ->
|
|||
"and _`unban_account`_ API.",
|
||||
module = ?MODULE, function = ban_account_v2,
|
||||
version = 2,
|
||||
note = "improved in 25.xx",
|
||||
note = "improved in 25.08",
|
||||
args = [{user, binary}, {host, binary}, {reason, binary}],
|
||||
args_example = [<<"attacker">>, <<"myserver.com">>, <<"Spaming other users">>],
|
||||
args_desc = ["User name to ban", "Server name",
|
||||
|
|
|
@ -240,7 +240,7 @@ get_plugins_html(Host, RawPath) ->
|
|||
[?MODULE, Path, F]),
|
||||
<<"https://cdn.conversejs.org/3rdparty/libsignal-protocol.min.js">>;
|
||||
_ ->
|
||||
fxml:crypt(<<RawPath/binary, "plugins/", F/binary>>)
|
||||
fxml:crypt(<<RawPath/binary, "/plugins/", F/binary>>)
|
||||
end,
|
||||
<<"<script src='", Plugin/binary, "' charset='utf-8'></script>">>
|
||||
end,
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
-export([bosh_service_url/1]).
|
||||
-export([conversejs_css/1]).
|
||||
-export([conversejs_options/1]).
|
||||
-export([conversejs_plugins/1]).
|
||||
-export([conversejs_resources/1]).
|
||||
-export([conversejs_script/1]).
|
||||
-export([default_domain/1]).
|
||||
|
@ -29,6 +30,12 @@ conversejs_options(Opts) when is_map(Opts) ->
|
|||
conversejs_options(Host) ->
|
||||
gen_mod:get_module_opt(Host, mod_conversejs, conversejs_options).
|
||||
|
||||
-spec conversejs_plugins(gen_mod:opts() | global | binary()) -> [binary()].
|
||||
conversejs_plugins(Opts) when is_map(Opts) ->
|
||||
gen_mod:get_opt(conversejs_plugins, Opts);
|
||||
conversejs_plugins(Host) ->
|
||||
gen_mod:get_module_opt(Host, mod_conversejs, conversejs_plugins).
|
||||
|
||||
-spec conversejs_resources(gen_mod:opts() | global | binary()) -> 'undefined' | binary().
|
||||
conversejs_resources(Opts) when is_map(Opts) ->
|
||||
gen_mod:get_opt(conversejs_resources, Opts);
|
||||
|
|
|
@ -1007,10 +1007,10 @@ mod_doc() ->
|
|||
[?T("https://matrix.org/[Matrix] gateway. "),
|
||||
?T("Supports room versions 9, 10 and 11 since ejabberd 25.03; "
|
||||
"room versions 4 and higher since ejabberd 25.07; "
|
||||
"room version 12 (hydra rooms) since ejabberd 25.xx. "),
|
||||
"room version 12 (hydra rooms) since ejabberd 25.08. "),
|
||||
?T("Erlang/OTP 25 or higher is required to use this module."),
|
||||
?T("This module is available since ejabberd 24.02.")],
|
||||
note => "improved in 25.xx",
|
||||
note => "improved in 25.08",
|
||||
example =>
|
||||
["listen:",
|
||||
" -",
|
||||
|
|
|
@ -328,7 +328,7 @@ mod_doc() ->
|
|||
"_`listen-options.md#request_handlers|request_handlers`_. "
|
||||
"Notice you should set in _`listen.md#ejabberd_http|ejabberd_http`_ "
|
||||
"the option _`listen-options.md#tls|tls`_ enabled.")],
|
||||
note => "added in 25.xx",
|
||||
note => "added in 25.08",
|
||||
opts =>
|
||||
[{languages,
|
||||
#{value => "[string()]",
|
||||
|
|
111
src/mod_providers_opt.erl
Normal file
111
src/mod_providers_opt.erl
Normal file
|
@ -0,0 +1,111 @@
|
|||
%% Generated automatically
|
||||
%% DO NOT EDIT: run `make options` instead
|
||||
|
||||
-module(mod_providers_opt).
|
||||
|
||||
-export([alternativeJids/1]).
|
||||
-export([busFactor/1]).
|
||||
-export([freeOfCharge/1]).
|
||||
-export([languages/1]).
|
||||
-export([legalNotice/1]).
|
||||
-export([maximumHttpFileUploadStorageTime/1]).
|
||||
-export([maximumHttpFileUploadTotalSize/1]).
|
||||
-export([maximumMessageArchiveManagementStorageTime/1]).
|
||||
-export([organization/1]).
|
||||
-export([passwordReset/1]).
|
||||
-export([professionalHosting/1]).
|
||||
-export([serverLocations/1]).
|
||||
-export([serverTesting/1]).
|
||||
-export([since/1]).
|
||||
-export([website/1]).
|
||||
|
||||
-spec alternativeJids(gen_mod:opts() | global | binary()) -> [binary()].
|
||||
alternativeJids(Opts) when is_map(Opts) ->
|
||||
gen_mod:get_opt(alternativeJids, Opts);
|
||||
alternativeJids(Host) ->
|
||||
gen_mod:get_module_opt(Host, mod_providers, alternativeJids).
|
||||
|
||||
-spec busFactor(gen_mod:opts() | global | binary()) -> integer().
|
||||
busFactor(Opts) when is_map(Opts) ->
|
||||
gen_mod:get_opt(busFactor, Opts);
|
||||
busFactor(Host) ->
|
||||
gen_mod:get_module_opt(Host, mod_providers, busFactor).
|
||||
|
||||
-spec freeOfCharge(gen_mod:opts() | global | binary()) -> boolean().
|
||||
freeOfCharge(Opts) when is_map(Opts) ->
|
||||
gen_mod:get_opt(freeOfCharge, Opts);
|
||||
freeOfCharge(Host) ->
|
||||
gen_mod:get_module_opt(Host, mod_providers, freeOfCharge).
|
||||
|
||||
-spec languages(gen_mod:opts() | global | binary()) -> [binary()].
|
||||
languages(Opts) when is_map(Opts) ->
|
||||
gen_mod:get_opt(languages, Opts);
|
||||
languages(Host) ->
|
||||
gen_mod:get_module_opt(Host, mod_providers, languages).
|
||||
|
||||
-spec legalNotice(gen_mod:opts() | global | binary()) -> binary().
|
||||
legalNotice(Opts) when is_map(Opts) ->
|
||||
gen_mod:get_opt(legalNotice, Opts);
|
||||
legalNotice(Host) ->
|
||||
gen_mod:get_module_opt(Host, mod_providers, legalNotice).
|
||||
|
||||
-spec maximumHttpFileUploadStorageTime(gen_mod:opts() | global | binary()) -> 'default_value' | integer().
|
||||
maximumHttpFileUploadStorageTime(Opts) when is_map(Opts) ->
|
||||
gen_mod:get_opt(maximumHttpFileUploadStorageTime, Opts);
|
||||
maximumHttpFileUploadStorageTime(Host) ->
|
||||
gen_mod:get_module_opt(Host, mod_providers, maximumHttpFileUploadStorageTime).
|
||||
|
||||
-spec maximumHttpFileUploadTotalSize(gen_mod:opts() | global | binary()) -> 'default_value' | integer().
|
||||
maximumHttpFileUploadTotalSize(Opts) when is_map(Opts) ->
|
||||
gen_mod:get_opt(maximumHttpFileUploadTotalSize, Opts);
|
||||
maximumHttpFileUploadTotalSize(Host) ->
|
||||
gen_mod:get_module_opt(Host, mod_providers, maximumHttpFileUploadTotalSize).
|
||||
|
||||
-spec maximumMessageArchiveManagementStorageTime(gen_mod:opts() | global | binary()) -> integer().
|
||||
maximumMessageArchiveManagementStorageTime(Opts) when is_map(Opts) ->
|
||||
gen_mod:get_opt(maximumMessageArchiveManagementStorageTime, Opts);
|
||||
maximumMessageArchiveManagementStorageTime(Host) ->
|
||||
gen_mod:get_module_opt(Host, mod_providers, maximumMessageArchiveManagementStorageTime).
|
||||
|
||||
-spec organization(gen_mod:opts() | global | binary()) -> '' | 'commercial person' | 'company' | 'governmental' | 'non-governmental' | 'private person'.
|
||||
organization(Opts) when is_map(Opts) ->
|
||||
gen_mod:get_opt(organization, Opts);
|
||||
organization(Host) ->
|
||||
gen_mod:get_module_opt(Host, mod_providers, organization).
|
||||
|
||||
-spec passwordReset(gen_mod:opts() | global | binary()) -> 'default_value' | binary().
|
||||
passwordReset(Opts) when is_map(Opts) ->
|
||||
gen_mod:get_opt(passwordReset, Opts);
|
||||
passwordReset(Host) ->
|
||||
gen_mod:get_module_opt(Host, mod_providers, passwordReset).
|
||||
|
||||
-spec professionalHosting(gen_mod:opts() | global | binary()) -> boolean().
|
||||
professionalHosting(Opts) when is_map(Opts) ->
|
||||
gen_mod:get_opt(professionalHosting, Opts);
|
||||
professionalHosting(Host) ->
|
||||
gen_mod:get_module_opt(Host, mod_providers, professionalHosting).
|
||||
|
||||
-spec serverLocations(gen_mod:opts() | global | binary()) -> [binary()].
|
||||
serverLocations(Opts) when is_map(Opts) ->
|
||||
gen_mod:get_opt(serverLocations, Opts);
|
||||
serverLocations(Host) ->
|
||||
gen_mod:get_module_opt(Host, mod_providers, serverLocations).
|
||||
|
||||
-spec serverTesting(gen_mod:opts() | global | binary()) -> boolean().
|
||||
serverTesting(Opts) when is_map(Opts) ->
|
||||
gen_mod:get_opt(serverTesting, Opts);
|
||||
serverTesting(Host) ->
|
||||
gen_mod:get_module_opt(Host, mod_providers, serverTesting).
|
||||
|
||||
-spec since(gen_mod:opts() | global | binary()) -> binary().
|
||||
since(Opts) when is_map(Opts) ->
|
||||
gen_mod:get_opt(since, Opts);
|
||||
since(Host) ->
|
||||
gen_mod:get_module_opt(Host, mod_providers, since).
|
||||
|
||||
-spec website(gen_mod:opts() | global | binary()) -> binary().
|
||||
website(Opts) when is_map(Opts) ->
|
||||
gen_mod:get_opt(website, Opts);
|
||||
website(Host) ->
|
||||
gen_mod:get_module_opt(Host, mod_providers, website).
|
||||
|
|
@ -961,8 +961,6 @@ presence_broadcast(Config) ->
|
|||
sub_els = [#disco_info{node = Node}]} = recv_iq(Config),
|
||||
#message{type = chat,
|
||||
subject = [#text{lang = <<"en">>,data = <<"Welcome!">>}]} = recv_message(Config),
|
||||
#message{type = normal,
|
||||
subject = [#text{lang = <<"en">>,data = <<"Welcome!">>}]} = recv_message(Config),
|
||||
#presence{from = JID, to = JID} = recv_presence(Config),
|
||||
send(Config, #iq{type = result, id = IQ#iq.id,
|
||||
to = JID, sub_els = [Info]}),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue