What is the Acc parameter in roster module mean?
Many functions in the mod_roster.erl file accep开发者_开发百科t an "Acc" parameter. What does this parameter store? It is always empty in my function calls.
e.g.
get_user_roster(Acc, US) ->
....
Basing on implementation I would say that is just syntactic sugar over propagating final roster list.
I never used it with Acc =/= []. As I see, non of ejabberd's module does otherwise (always Acc = [], so nothing is appended to roster retrieved from database).
I can imagine that we can call this function with some custom/client data and make implementation of custom module more compact.
精彩评论