Skip to content

Commit

Permalink
[BugFix] Newlines are no longer supported in VRChat ChatBox text.
Browse files Browse the repository at this point in the history
  • Loading branch information
Soapwood committed Sep 18, 2024
1 parent b1ec155 commit f5aa233
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 0 additions & 2 deletions VXMusic/Notifications/VRChat/VrChatOscNotificationClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public void SendNotification(NotificationLevel level, string title, string conte

public void SendNotification(NotificationLevel level, string title, string content, int timeout)
{
// TODO Use Timeout to start and end ChatBox message?
if (IsConnectedToVrChatRuntime)
{
Instance.SendChatbox(title + content, true); // Bypass keyboard and sends string to Chatbox
Expand All @@ -63,7 +62,6 @@ public void SendNotification(NotificationLevel level, string title, string conte

public async Task SendNotificationAsync(NotificationLevel level, string title, string content, int timeout)
{
// TODO Use Timeout to start and end ChatBox message?
if (IsConnectedToVrChatRuntime)
{
Instance.SendChatbox(title + content, true); // Bypass keyboard and sends string to Chatbox
Expand Down
8 changes: 3 additions & 5 deletions VXMusicDesktop/VXMusicActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ await Task.Run(() =>
App.VXMusicSession.ToastNotification.SendNotification(NotificationLevel.Warning,"Oops, couldn't get that.",
"Tech Tip: Have you tried turning up your Media Volume?", 5);
if(App.VXMusicSession.NotificationSettings.IsVRChatNotificationServiceEnabled)
App.VXMusicSession.VrChatNotification.SendNotificationAsync(NotificationLevel.Warning, $"Couldn't catch that!\n", "Try turning up World Volume.", 3000);
App.VXMusicSession.VrChatNotification.SendNotificationAsync(NotificationLevel.Warning, $"Couldn't catch that! ", "Try turning up World Volume.", 3000);
}
else if (result.Status == Status.RecordingError)
{
Expand All @@ -92,15 +92,13 @@ await Task.Run(() =>
$"{result.Result.Album} ({result.Result.ReleaseDate})", 8, result.Result.AlbumArt);

if(App.VXMusicSession.NotificationSettings.IsVRChatNotificationServiceEnabled)
App.VXMusicSession.VrChatNotification.SendNotificationAsync(NotificationLevel.Success,$"{result.Result.Artist} - {result.Result.Title}\n",
$"{result.Result.Album} ({result.Result.ReleaseDate})", 5000);
App.VXMusicSession.VrChatNotification.SendNotificationAsync(NotificationLevel.Success,$"{result.Result.Artist} - {result.Result.Title} ",
$"[{result.Result.Album}] ({result.Result.ReleaseDate})", 5000);
}

if(App.VXMusicSession.NotificationSettings.IsVRChatNotificationServiceEnabled)
App.VXMusicSession.VrChatNotification.SendChatboxTypingIndicator(false);



if (result.Result != null && SpotifyAuthentication.CurrentConnectionState == SpotifyConnectionState.Connected)
{
ReportTrackToSpotifyPlaylist(result);
Expand Down
4 changes: 2 additions & 2 deletions VXMusicDesktop/VXMusicDesktop.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
<PackageIcon>VXLogo.png</PackageIcon>
<ApplicationIcon>Images\VXLogoIcon.ico</ApplicationIcon>
<RunPostBuildEvent>Always</RunPostBuildEvent>
<Version>0.6.6.1</Version>
<Version>0.6.6.2</Version>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
<Title>VXMusicDesktop</Title>
<Authors>VirtualXtensions</Authors>
<Description>Desktop Client for VXMusic</Description>
<Copyright>Soapwood 2023</Copyright>
<Copyright>Soapwood 2024</Copyright>
<PackageProjectUrl>https://github.com/Soapwood/VXMusic</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/Soapwood/VXMusic/blob/main/license.txt</PackageLicenseUrl>
<RepositoryUrl>https://github.com/Soapwood/VXMusic</RepositoryUrl>
Expand Down

0 comments on commit f5aa233

Please sign in to comment.