From 76eba3647a9763e7e1e65759f13f61d3b9e73e87 Mon Sep 17 00:00:00 2001 From: Mickael Remond Date: Mon, 1 Aug 2016 15:46:14 +0200 Subject: [PATCH] Implement gen_mod callback in ModPresenceDemo module --- lib/mod_presence_demo.ex | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/mod_presence_demo.ex b/lib/mod_presence_demo.ex index 89fc60d87..ba5abe90e 100644 --- a/lib/mod_presence_demo.ex +++ b/lib/mod_presence_demo.ex @@ -7,15 +7,20 @@ defmodule ModPresenceDemo do Ejabberd.Hooks.add(:set_presence_hook, host, __ENV__.module, :on_presence, 50) :ok end - + def stop(host) do info('Stopping ejabberd module Presence Demo') Ejabberd.Hooks.delete(:set_presence_hook, host, __ENV__.module, :on_presence, 50) :ok end - + def on_presence(user, _server, _resource, _packet) do info('Receive presence for #{user}') :none - end + end + + # gen_mod callbacks + def depends(_host, _opts), do: [] + def mod_opt_type(_), do: [] + end