Add new hook: c2s_post_auth_features
authorHolger Weiss <holger@zedat.fu-berlin.de>
Thu, 25 Sep 2014 16:15:33 +0000 (18:15 +0200)
committerHolger Weiss <holger@zedat.fu-berlin.de>
Thu, 25 Sep 2014 16:15:33 +0000 (18:15 +0200)
The c2s_post_auth_features hook can be used to extend the list of stream
features offered after authentication.

src/ejabberd_c2s.erl

index f5427aa4e131831f7618744dd70791c839d4842a..bb39b37e7dac96f3875908b9b28f6ba7e1c818cc 100644 (file)
@@ -493,6 +493,8 @@ wait_for_stream({xmlstreamstart, _Name, Attrs}, StateData) ->
                                                            RosterVersioningFeature ++
                                                            StreamManagementFeature ++
                                                            ClientStateFeature ++
+                                                           ejabberd_hooks:run_fold(c2s_post_auth_features,
+                                                               Server, [], [Server]) ++
                                                            ejabberd_hooks:run_fold(c2s_stream_features,
                                                                Server, [], [Server]),
                                        send_element(StateData,