From 1097d31d636899d31a4062ec8d48ce58b55c0206 Mon Sep 17 00:00:00 2001 From: Evgeniy Khramtsov Date: Wed, 27 Jul 2016 18:05:11 +0300 Subject: [PATCH] Fix type spec for set_from_to/3 --- src/xmpp.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xmpp.erl b/src/xmpp.erl index 5b7e3d1cc..6e8145190 100644 --- a/src/xmpp.erl +++ b/src/xmpp.erl @@ -205,9 +205,9 @@ set_to(#iq{} = IQ, J) -> IQ#iq{to = J}; set_to(#message{} = Msg, J) -> Msg#message{to = J}; set_to(#presence{} = Pres, J) -> Pres#presence{to = J}. --spec set_from_to(iq(), jid:jid(), jid:jid()) -> iq(); - (message(), jid:jid(), jid:jid()) -> message(); - (presence(), jid:jid(), jid:jid()) -> presence(). +-spec set_from_to(iq(), undefined | jid:jid(), undefined | jid:jid()) -> iq(); + (message(), undefined | jid:jid(), undefined | jid:jid()) -> message(); + (presence(), undefined | jid:jid(), undefined | jid:jid()) -> presence(). set_from_to(#iq{} = IQ, F, T) -> IQ#iq{from = F, to = T}; set_from_to(#message{} = Msg, F, T) -> Msg#message{from = F, to = T}; set_from_to(#presence{} = Pres, F, T) -> Pres#presence{from = F, to = T}. -- 2.40.0