mirror of
https://github.com/processone/ejabberd.git
synced 2024-10-13 15:16:49 +02:00
mod_push_mnesia: Simplify record matching
Omit record fields that aren't used for matching.
This commit is contained in:
parent
75127a0deb
commit
c2f664f941
@ -107,9 +107,7 @@ lookup_session(LUser, LServer, TS) ->
|
||||
lookup_sessions(LUser, LServer, PushJID) ->
|
||||
PushLJID = jid:tolower(PushJID),
|
||||
MatchSpec = ets:fun2ms(
|
||||
fun(#push_session{us = {U, S}, service = P,
|
||||
node = Node, timestamp = TS,
|
||||
xml = El} = Rec)
|
||||
fun(#push_session{us = {U, S}, service = P} = Rec)
|
||||
when U == LUser,
|
||||
S == LServer,
|
||||
P == PushLJID ->
|
||||
@ -124,11 +122,7 @@ lookup_sessions(LUser, LServer) ->
|
||||
|
||||
lookup_sessions(LServer) ->
|
||||
MatchSpec = ets:fun2ms(
|
||||
fun(#push_session{us = {_U, S},
|
||||
timestamp = TS,
|
||||
service = PushLJID,
|
||||
node = Node,
|
||||
xml = El} = Rec)
|
||||
fun(#push_session{us = {_U, S}} = Rec)
|
||||
when S == LServer ->
|
||||
Rec
|
||||
end),
|
||||
|
Loading…
Reference in New Issue
Block a user