-
Notifications
You must be signed in to change notification settings - Fork 45
Cannot set reminders for @channel
, @all
, and @here
#204
Comments
This issue occurs because when creating the Post, the Mattermost server sees that the Post has an empty Post.Type, and the bot user doesn't have permissions to post channel mentions. Thus There are several possible workarounds:
I'd personnaly be in favor of the option 2, because is consistent with the way user reminders are presented, and seems cleaner than option 1. |
@kemenaran I think you're referring to the problem described by #188, where the bot can find the channel but fails to post to it. I don't think that's actually fixed, but people are working around it by adding the bot to the channel. This issue is about the bot not even understanding the channel to begin with, before any posts are created, so permissions are irrelevant. When creating a reminder, its data gets saved into the |
Hmm, I wasn't referring to the issue in #188, but really to the issue description:
I agree that there's an issue on how channels are stored (especially for private channels), but I was trying to move forward the discussion on a generic-case issue, that is probably causing a lot of these troubles. (Nanely "Why when creating the post the server explicitly disables mentions?") |
This fixes the "@channel" and "@here" keywords not triggering mentions. By default, bot users are not allowed to trigger channel mentions. However, if the message type is not the default, this check is bypassed. Fix scottleedavis#204
This fixes the "@channel" and "@here" keywords not triggering mentions. By default, bot users are not allowed to trigger channel mentions. However, if the message type is not the default, this check is bypassed. Fix scottleedavis#204
This fixes the "@channel" and "@here" keywords not triggering mentions. By default, bot users are not allowed to trigger channel mentions. However, if the message type is not the default, this check is bypassed. Fix scottleedavis#204
This fixes the "@channel" and "@here" keywords not triggering mentions. By default, bot users are not allowed to trigger channel mentions. However, if the message type is not the default, this check is bypassed. Fix scottleedavis#204
Is this going to be taken in a release? Would be very useful! |
At the point it tries to execute the request, it appears to exclude the channel ID form the parser's input data even though it's available in that context as |
Guys, will this be fixed in the next releases? I really need this fix. |
This fixes the "@channel" and "@here" keywords not triggering mentions. By default, bot users are not allowed to trigger channel mentions. However, if the message type is not the default, this check is bypassed. Fix scottleedavis#204
I fixed the issue on the CodeursEnLiberte fork, but never submitted a PR. I just opened #220 with a fix for this issue. |
@kemenaran Can you explain how setting a custom message type will solve this issue? The problem is that the plugin does not know where to post the message, not that it's unable to be posted. Maybe your PR helps resolve #188? |
It solves the problem because global mentions (such as The officially sanctioned workaround is to use a custom message type. In that case, the message is always allowed to trigger a global mention. And thus writing a reminder containing |
@kemenaran I've explained the details of this issue numerous times, and every time you've responded, you've described the problem of being not allowed to use special mentions in the reminder content, which is not the issue I'm describing. This issue occurs even if there are no special mentions in the reminder content. You keep ignoring the fact that when you're passing a custom Please refrain from commenting any further on this issue until you've actually tried the test case:
|
awaiting response from mm team regarding #195 (comment) before movement on this issue |
Summary
Plugin doesn't seem to correctly resolve special username-like keywords
@channel
,@all
, and@here
when attempting to post reminders.Steps to reproduce
Steps to reproduce the behavior:
/remind @channel test in 1 minute
Expected behavior
Reminder should be posted as if one had used
~channel-name
, explicitly.Observed behavior (that appears unintentional)
Reminder does not appear and shows as "Past and incomplete" in
/remind list
output.Server configuration
Operating system: Debian
Mattermost version: 5.36.1
Remind version: 0.4.4
Updated from an older Remind bot version or fresh install: Updated
Mattermost server logs
Additional context
Related to #188 but I think distinct from that because, according to others, even
~channel-name
notation fails for private channels. Also mentioned here.Viewing the raw database records for such reminders, most ID strings looked internal to the plugin (searching for them in other tables yielded no results). The external IDs/refs I found were
.TeamId
,.Username
, and.Target
. I could find no absolute reference (name or ID) to the channel in which the command was issued,.Target
was just@channel
.Using the channel name internally seems like a bad choice anyway since it can be changed between setting a reminder and it being posted. If both specials and explicit channel names were resolved to an ID when a command gets parsed, and that ID were added to the reminder data, wouldn't that be sufficient to post to the (correct) channel? I assume that differentiating the specials in a reminder post's content, in order to handle who gets notified, is up to Mattermost core, not for this plugin to worry about.
mattermost-plugin-remind/server/reminder.go
Line 93 in 39d6b97
The text was updated successfully, but these errors were encountered: