equal
deleted
inserted
replaced
114 legacy = true; |
114 legacy = true; |
115 }; |
115 }; |
116 end |
116 end |
117 |
117 |
118 -- Update state |
118 -- Update state |
119 local legacy_info = session.client_management_info; |
|
120 client_state.full_jid = session.full_jid; |
119 client_state.full_jid = session.full_jid; |
121 client_state.last_seen = now; |
120 client_state.last_seen = now; |
122 client_state.mechanisms[legacy_info.mechanism] = now; |
121 |
123 if legacy_info.fast_auth then |
122 local legacy_info = session.client_management_info; |
124 client_state.fast_auth = now; |
123 if legacy_info then |
125 end |
124 client_state.mechanisms[legacy_info.mechanism] = now; |
126 |
125 if legacy_info.fast_auth then |
127 local token_id = legacy_info.token_info and legacy_info.token_info.id; |
126 client_state.fast_auth = now; |
128 if token_id then |
127 end |
129 client_state.auth_token_id = token_id; |
128 |
|
129 local token_id = legacy_info.token_info and legacy_info.token_info.id; |
|
130 if token_id then |
|
131 client_state.auth_token_id = token_id; |
|
132 end |
|
133 else |
|
134 session.log("warn", "Missing client management info") |
130 end |
135 end |
131 |
136 |
132 -- Store updated state |
137 -- Store updated state |
133 client_store:set_key(session.username, client_state.id, client_state); |
138 client_store:set_key(session.username, client_state.id, client_state); |
134 |
139 |