Skip to content

Commit

Permalink
jid_matches does not do probabilistic resource similarities (otherwis…
Browse files Browse the repository at this point in the history
…e navigation is broken due to multiple google logins etc)
  • Loading branch information
hannesm committed Aug 6, 2015
1 parent 9995284 commit 79d0ec6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/user.ml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ module Jid = struct
match jid, jid' with
| `Bare bare, `Bare bare' -> bare_jid_equal bare bare'
| `Bare bare, `Full (bare', _) -> bare_jid_equal bare bare'
| `Full (bare, resource), `Full (bare', resource') -> bare_jid_equal bare bare' && resource_similar resource resource'
| `Full (bare, resource), `Full (bare', resource') -> bare_jid_equal bare bare' && resource = resource'
| _ -> false


Expand Down Expand Up @@ -474,6 +474,7 @@ let find_or_create_session user resource config dsa =
let others = match similar with
| None -> user.active_sessions
| Some x ->
(* XXX: need to revise notifications! *)
let others = List.filter (fun s -> x.resource <> s.resource) user.active_sessions in
if x.presence = `Offline then
others
Expand Down

0 comments on commit 79d0ec6

Please sign in to comment.