Strip tags when doing friends chat lookups

The previous friend chat manager would do this when loading a name into the cache, but now that the cache is gone, we need to do it prior to the lookup
This commit is contained in:
Adam
2021-05-28 14:54:29 -04:00
parent 04dc76bbfd
commit 3c59e4bcf0
2 changed files with 3 additions and 2 deletions

View File

@@ -786,7 +786,7 @@ public class ChatChannelPlugin extends Plugin
private void insertRankIcon(final ChatMessage message)
{
final FriendsChatRank rank = getRank(message.getName());
final FriendsChatRank rank = getRank(Text.removeTags(message.getName()));
if (rank != null && rank != FriendsChatRank.UNRANKED)
{

View File

@@ -38,6 +38,7 @@ import net.runelite.api.clan.ClanChannelMember;
import net.runelite.api.clan.ClanRank;
import net.runelite.api.clan.ClanSettings;
import net.runelite.api.clan.ClanTitle;
import net.runelite.client.util.Text;
@Singleton
public class PlayerIndicatorsService
@@ -130,7 +131,7 @@ public class PlayerIndicatorsService
return FriendsChatRank.UNRANKED;
}
FriendsChatMember friendsChatMember = friendsChatManager.findByName(player.getName());
FriendsChatMember friendsChatMember = friendsChatManager.findByName(Text.removeTags(player.getName()));
return friendsChatMember != null ? friendsChatMember.getRank() : FriendsChatRank.UNRANKED;
}
}