Skip to content

Commit

Permalink
Fix missing username in sub notices
Browse files Browse the repository at this point in the history
  • Loading branch information
tommyxchow committed Nov 28, 2023
1 parent bdba3c0 commit 2801c64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/models/irc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ class IRCMessage {
final displayName = tags['display-name']!;
span.add(
TextSpan(
text: getReadableName(displayName, user!),
text: user != null ? getReadableName(displayName, user!) : user,
style: TextStyle(
color: color,
fontWeight: FontWeight.bold,
Expand Down Expand Up @@ -772,7 +772,7 @@ class IRCMessage {
// If the username exists, set it.
// tmi.twitch.tv means the message was sent by Twitch rather than a user, so will be irrelevant.
final String? user = splitMessage[0] == 'tmi.twitch.tv'
? null
? mappedTags['login']
: splitMessage[0].substring(0, splitMessage[0].indexOf('!'));

// If there is an associated message, set it.
Expand Down

0 comments on commit 2801c64

Please sign in to comment.