mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-08 15:20:55 +00:00
Fix bug tokenizing cheers in messages. Try to fix any bugs getting a user for a room. Strip apollo 404 messages from Sentry. Don't show the expansion arrows in the emote menu when using a filter. Fix emoji tab completion a bit. 🐝
should not match 🍺
. Start using crossorigin for script serving. Add a debug transformation for localization.
This commit is contained in:
parent
730e2129e9
commit
e581b50b08
13 changed files with 133 additions and 18 deletions
|
@ -116,7 +116,7 @@ export default class Room {
|
|||
}
|
||||
|
||||
|
||||
getUser(id, login, no_create, no_login) {
|
||||
getUser(id, login, no_create, no_login, error = false) {
|
||||
if ( this.destroyed )
|
||||
return null;
|
||||
|
||||
|
@ -130,17 +130,28 @@ export default class Room {
|
|||
else if ( this.users[login] && ! no_login )
|
||||
user = this.users[login];
|
||||
|
||||
else if ( no_create )
|
||||
return null;
|
||||
if ( user && user.destroyed )
|
||||
user = null;
|
||||
|
||||
if ( ! user ) {
|
||||
if ( no_create )
|
||||
return null;
|
||||
|
||||
else
|
||||
user = new User(this.manager, this, id, login);
|
||||
}
|
||||
|
||||
if ( id && id !== user.id ) {
|
||||
// If the ID isn't what we expected, something is very wrong here.
|
||||
// Blame name changes.
|
||||
if ( user.id )
|
||||
throw new Error('id mismatch');
|
||||
if ( user.id ) {
|
||||
this.manager.log.warn(`Data mismatch for user #${id} -- Stored ID: ${user.id} -- Login: ${login} -- Stored Login: ${user.login}`);
|
||||
if ( error )
|
||||
throw new Error('id mismatch');
|
||||
|
||||
// Remove the old reference if we're going with this.
|
||||
if ( this.user_ids[user.id] === user )
|
||||
this.user_ids[user.id] = null;
|
||||
}
|
||||
|
||||
// Otherwise, we're just here to set the ID.
|
||||
user._id = id;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue