|
@@ -208,8 +208,7 @@ end
|
208
|
208
|
-- @param creator_group the group of the user who created the user which
|
209
|
209
|
-- presence we are updating (this is the poltergeist case, where a user creates
|
210
|
210
|
-- a poltergeist), optional.
|
211
|
|
-function update_presence_identity(
|
212
|
|
- stanza, user, group, creator_user, creator_group)
|
|
211
|
+function update_presence_identity(stanza, user, group, creator_user, creator_group)
|
213
|
212
|
|
214
|
213
|
-- First remove any 'identity' element if it already
|
215
|
214
|
-- exists, so it cannot be spoofed by a client
|
|
@@ -222,7 +221,11 @@ function update_presence_identity(
|
222
|
221
|
end
|
223
|
222
|
return tag
|
224
|
223
|
end
|
225
|
|
- )
|
|
224
|
+ );
|
|
225
|
+
|
|
226
|
+ if not user then
|
|
227
|
+ return;
|
|
228
|
+ end
|
226
|
229
|
|
227
|
230
|
stanza:tag("identity"):tag("user");
|
228
|
231
|
for k, v in pairs(user) do
|