-
-
Notifications
You must be signed in to change notification settings - Fork 14
Formatting of 'topic changed' for the channelUpdate event log is inconsistent #406
Copy link
Copy link
Open
Labels
Bug: ConfirmedIssues that report confirmed bugs.Issues that report confirmed bugs.Meta: BugfixPRs that fix bugs or issues.PRs that fix bugs or issues.Priority: LowIssues that must be fixed or PRs that must be finished and merged with low priority.Issues that must be fixed or PRs that must be finished and merged with low priority.Type: MaintenanceIssues and PRs related to the maintenance of a feature or function.Issues and PRs related to the maintenance of a feature or function.
Metadata
Metadata
Assignees
Labels
Bug: ConfirmedIssues that report confirmed bugs.Issues that report confirmed bugs.Meta: BugfixPRs that fix bugs or issues.PRs that fix bugs or issues.Priority: LowIssues that must be fixed or PRs that must be finished and merged with low priority.Issues that must be fixed or PRs that must be finished and merged with low priority.Type: MaintenanceIssues and PRs related to the maintenance of a feature or function.Issues and PRs related to the maintenance of a feature or function.
Describe the bug
The formatting of the 'topic changed' entry for the
channelUpdateevent log is inconsistent depending on what the topic is set to. When no topic exists and one is set, or when you unset the topic, it's formatted as if the string length exceeds 64 characters despite there effectively being 0 characters.To Reproduce
Steps to reproduce the behavior:
Expected behavior
If either the old or new topic string length exceeds 64 characters, the entry should be formatted for long strings (i.e. the
Events.Guilds.Logs.ChangeLongTextlanguage string). If both the old or new topic string lengths are under 64 characters (including if they are unset, meaning 0 characters), the entry should be formatted for short strings (i.e. theEvents.Guilds.Logs.ChangeShortTextlanguage string).Screenshots

Long string formatting applied correctly.
Short string formatting applied correctly.

Long string formatting incorrectly applied when topic length is 0 characters long.

Additional context
Relevant code snippet.
rtbyte/src/listeners/guilds/channels/channelUpdateLog.ts
Lines 69 to 78 in 3249f09