Skip to content

Commit

Permalink
fix language change event log
Browse files Browse the repository at this point in the history
Signed-off-by: si458 <simonsmith5521@gmail.com>
  • Loading branch information
si458 committed Jul 23, 2024
1 parent 31c3235 commit df64748
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion meshuser.js
Original file line number Diff line number Diff line change
Expand Up @@ -6134,7 +6134,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
parent.db.SetUser(user);

// Event the change
var message = { etype: 'user', userid: user._id, username: user.name, account: parent.CloneSafeUser(user), action: 'accountchange', domain: domain.id, msgid: 2, msgArgs: [(oldlang ? oldlang : 'default'), (user.lang ? user.lang : 'default')] };
var message = { etype: 'user', userid: user._id, username: user.name, account: parent.CloneSafeUser(user), action: 'accountchange', domain: domain.id, msgid: 3, msgArgs: ['', (oldlang ? oldlang : 'default'), (user.lang ? user.lang : 'default')] };
if (db.changeStream) { message.noact = 1; } // If DB change stream is active, don't use this event to change the user. Another event will come.
message.msg = 'Changed language from ' + (oldlang ? oldlang : 'default') + ' to ' + (user.lang ? user.lang : 'default');

Expand Down

0 comments on commit df64748

Please sign in to comment.