Skip to content

Commit

Permalink
Fix auto-threading not working when content aware naming is on and th…
Browse files Browse the repository at this point in the history
…e message posted is just an image.

This was because when we take the first 75 characters of the content aware name, it makes the string no longer null and just an empty string, so the check to see if the string was null (empty) was being bypassed. Simple fix as show in the commit
  • Loading branch information
NoComment1105 committed Jul 15, 2024
1 parent df39981 commit 6b2fb8c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ None
* **Arguments**:
* `channel` - The channel to view the auto-threading settings for. - Channel

Hopefull---
---
### Command name: `clear count`
**Description**: Clear a specific count of messages

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ class AutoThreading : Extension() {

var threadName: String? = event.message.content.trim().split("\n").firstOrNull()?.take(75)

if (!options.contentAwareNaming || threadName == null) {
if (!options.contentAwareNaming || threadName.isNullOrEmpty()) {
threadName = "Thread for ${
message?.author?.asUser()?.username ?: proxiedMessage?.member?.name
}".take(75)
Expand Down

0 comments on commit 6b2fb8c

Please sign in to comment.