From 0a047d790faed9caa9ad150dce16529ddc233afc Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Fri, 23 Jan 2015 00:42:18 +0100 Subject: [PATCH] Fix a few function specifications --- src/jlib.erl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/jlib.erl b/src/jlib.erl index 593134176..2c0f30b3f 100644 --- a/src/jlib.erl +++ b/src/jlib.erl @@ -601,12 +601,13 @@ rsm_encode_count(Count, Arr) -> children = [{xmlcdata, i2l(Count)}]} | Arr]. --spec add_delay_info(xmlel(), erlang:timestamp(), binary()) -> xmlel(). +-spec add_delay_info(xmlel(), jid() | ljid() | binary(), erlang:timestamp()) + -> xmlel(). add_delay_info(El, From, Time) -> add_delay_info(El, From, Time, <<"">>). --spec add_delay_info(xmlel(), erlang:timestamp(), binary(), +-spec add_delay_info(xmlel(), jid() | ljid() | binary(), erlang:timestamp(), binary()) -> xmlel(). add_delay_info(El, From, Time, Desc) -> @@ -615,8 +616,8 @@ add_delay_info(El, From, Time, Desc) -> El2 = add_delay_info(El1, From, Time, Desc, <<"x">>, ?NS_DELAY91), El2. --spec add_delay_info(xmlel(), erlang:timestamp(), binary(), binary(), binary(), - binary()) -> xmlel(). +-spec add_delay_info(xmlel(), jid() | ljid() | binary(), erlang:timestamp(), + binary(), binary(), binary()) -> xmlel(). add_delay_info(El, From, Time, Desc, Name, XMLNS) -> case xml:get_subtag_with_xmlns(El, Name, XMLNS) of @@ -647,7 +648,7 @@ add_delay_info(El, From, Time, Desc, Name, XMLNS) -> xml:append_subtags(NewEl, [NewDelayTag]) end. --spec create_delay_tag(erlang:timestamp(), jid() | binary(), binary(), +-spec create_delay_tag(erlang:timestamp(), jid() | ljid() | binary(), binary(), binary()) -> xmlel() | error. create_delay_tag(TimeStamp, FromJID, Desc, XMLNS) when is_tuple(FromJID) ->