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 ->
|
||||
AddInfo;
|
||||
MaxSize ->
|
||||
XData = lists:map(
|
||||
fun(NS) ->
|
||||
Fs = http_upload:encode(
|
||||
[{'max-file-size', MaxSize}], NS, Lang),
|
||||
#xdata{type = result, fields = Fs}
|
||||
end, [?NS_HTTP_UPLOAD, ?NS_HTTP_UPLOAD_0]),
|
||||
XData ++ AddInfo
|
||||
lists:foldl(
|
||||
fun(NS, Acc) ->
|
||||
Fs = http_upload:encode(
|
||||
[{'max-file-size', MaxSize}], NS, Lang),
|
||||
[#xdata{type = result, fields = Fs}|Acc]
|
||||
end, AddInfo, [?NS_HTTP_UPLOAD_0, ?NS_HTTP_UPLOAD])
|
||||
end,
|
||||
#disco_info{identities = [#identity{category = <<"store">>,
|
||||
type = <<"file">>,
|
||||
|
Loading…
Reference in New Issue
Block a user