1
0
Fork 0
mirror of https://github.com/processone/ejabberd synced 2025-10-04 18:29:20 +02:00

Simplify backend interface for mod_push

This commit is contained in:
Evgeniy Khramtsov 2017-10-27 10:55:48 +03:00
parent 568ab526e2
commit 484e5de072
4 changed files with 35 additions and 32 deletions

View file

@ -67,7 +67,7 @@ lookup_session(LUser, LServer, PushJID, Node) ->
XData = decode_xdata(XML, LUser, LServer),
{ok, {NowTS, PushLJID, Node, XData}};
{selected, []} ->
error;
{error, notfound};
Err ->
?ERROR_MSG("Failed to select from 'push_session' table: ~p", [Err]),
{error, db_failure}
@ -85,7 +85,7 @@ lookup_session(LUser, LServer, NowTS) ->
XData = decode_xdata(XML, LUser, LServer),
{ok, {NowTS, PushLJID, Node, XData}};
{selected, []} ->
error;
{error, notfound};
Err ->
?ERROR_MSG("Failed to select from 'push_session' table: ~p", [Err]),
{error, db_failure}