mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Use lists:foldl/3
This commit is contained in:
parent
af8c6d2428
commit
9a11db91f9
@ -689,13 +689,12 @@ iq_disco_info(Host, Lang, Name, AddInfo) ->
|
|||||||
infinity ->
|
infinity ->
|
||||||
AddInfo;
|
AddInfo;
|
||||||
MaxSize ->
|
MaxSize ->
|
||||||
XData = lists:map(
|
lists:foldl(
|
||||||
fun(NS) ->
|
fun(NS, Acc) ->
|
||||||
Fs = http_upload:encode(
|
Fs = http_upload:encode(
|
||||||
[{'max-file-size', MaxSize}], NS, Lang),
|
[{'max-file-size', MaxSize}], NS, Lang),
|
||||||
#xdata{type = result, fields = Fs}
|
[#xdata{type = result, fields = Fs}|Acc]
|
||||||
end, [?NS_HTTP_UPLOAD, ?NS_HTTP_UPLOAD_0]),
|
end, AddInfo, [?NS_HTTP_UPLOAD_0, ?NS_HTTP_UPLOAD])
|
||||||
XData ++ AddInfo
|
|
||||||
end,
|
end,
|
||||||
#disco_info{identities = [#identity{category = <<"store">>,
|
#disco_info{identities = [#identity{category = <<"store">>,
|
||||||
type = <<"file">>,
|
type = <<"file">>,
|
||||||
|
Loading…
Reference in New Issue
Block a user