Skip to content

Commit 3d7b543

Browse files
authored
Merge pull request #282 from Rustmail/281-fix-incorrect-thread-research-for-reminder-command
fix(reminder): retrieve thread by channel_id instead of user_id
2 parents 675de8a + 4386dd5 commit 3d7b543

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

rustmail/src/commands/add_reminder/text_command/add_reminder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ pub async fn add_reminder(
6262

6363
let trigger_timestamp = trigger_dt.with_timezone(&config.bot.timezone).timestamp();
6464

65-
let thread = match get_thread_by_user_id(msg.author.id, pool).await {
65+
let thread = match get_thread_by_channel_id(&msg.channel_id.to_string(), pool).await {
6666
Some(t) => t,
6767
None => {
6868
return Err(ModmailError::Thread(ThreadError::ThreadNotFound));

0 commit comments

Comments
 (0)