Skip to content

Commit 4386dd5

Browse files
committed
fix(reminder): retrieve thread by channel_id instead of user_id
1 parent 675de8a commit 4386dd5

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)