]> granicus.if.org Git - ejabberd/commitdiff
Cosmetic change, remove useless case
authorChristophe Romain <christophe.romain@process-one.net>
Wed, 25 Oct 2017 09:48:56 +0000 (11:48 +0200)
committerChristophe Romain <christophe.romain@process-one.net>
Wed, 25 Oct 2017 09:48:56 +0000 (11:48 +0200)
src/mod_pubsub.erl

index 22e095e7a1edeebe56891dcfd2b99f312ce116d0..1028a048d466efe90c6069e44e443bcdebfc0487 100644 (file)
@@ -447,10 +447,7 @@ disco_identity(Host, Node, From) ->
                    {result, _} ->
                        {result, [#identity{category = <<"pubsub">>, type = <<"pep">>},
                                  #identity{category = <<"pubsub">>, type = <<"leaf">>,
-                                           name = case get_option(Options, title) of
-                                                      false -> <<>>;
-                                                      Title -> Title
-                                                  end}]};
+                                           name = get_option(Options, title, <<>>)}]};
                    _ ->
                        {result, []}
                end
@@ -514,10 +511,7 @@ disco_items(Host, <<>>, From) ->
                    {result, _} ->
                        [#disco_item{node = Node,
                                     jid = jid:make(Host),
-                                    name = case get_option(Options, title) of
-                                               false -> <<>>;
-                                               Title -> Title
-                                           end} | Acc];
+                                    name = get_option(Options, title, <<>>)} | Acc];
                    _ ->
                        Acc
                end