Skip to content

Commit

Permalink
Fix blank OriginalPublisher issues (#432)
Browse files Browse the repository at this point in the history
When the OriginalPublisher was null, but a level was marked as a
reupload, it would lead to issues. This PR fixes that.


![image](https://github.com/LittleBigRefresh/Refresh/assets/51852312/34317428-01dd-47a2-85e3-ca4170fcac00)
  • Loading branch information
jvyden authored Apr 24, 2024
2 parents b1bcb8e + c8f5e1c commit 39103ba
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,18 @@ public class GameLevelResponse : IDataConvertableFrom<GameLevelResponse, GameLev
}
else
{
string publisher;
if (!old.IsReUpload)
publisher = "!DeletedUser";
else
publisher = string.IsNullOrEmpty(old.OriginalPublisher)
? "!UnknownPublisher"
: "!" + old.OriginalPublisher;

response.Handle = new SerializedUserHandle
{
IconHash = "0",
Username = string.IsNullOrEmpty(old.OriginalPublisher) ? "!DeletedUser" : "!" + old.OriginalPublisher,
Username = publisher,
};
}

Expand Down

0 comments on commit 39103ba

Please sign in to comment.