25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

Fix type spec for set_from_to/3

This commit is contained in:
Evgeniy Khramtsov 2016-07-27 18:05:11 +03:00
parent c409ed2f2c
commit 1097d31d63

View File

@ -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}.