Slack聊天工具默认发送电子邮件通知,说“你被提及......”实际上它是 @channel ,而不是你。我可以找到关闭它们的唯一方法是进入每个频道设置。
答案 0 :(得分:1)
我一直在寻找同样的东西而且我看到没有人回答,所以这就是我发现的:你不能而你却永远无法做到。
@channel :频道中的每个人,与用户签订的合同,频道内的所有人都应收到通知。
关键是Slack有网络礼仪,用户必须知道它。 @channel关键字的替代方案是 @everyone 和 @here ,第一个仅在" big"渠道,第二个仅适用于目前活跃的人群。您可以停用这些关键字的通知。
https://get.slack.help/hc/en-us/articles/202009646-Make-an-announcement
答案 1 :(得分:1)
答案 2 :(得分:1)
一段时间以来,我遇到了同样的问题,手动调整首选项非常耗时。 我已经写了一个脚本来为我自动化。
有关更深入的说明,请访问我的博客文章:
https://mobeigi.com/blog/programming/disable-slack-channel-and-here-notification-for-all-channels/
否则,前面的完整解决方案。
首先下载此脚本:
https://gist.github.com/mobeigi/8e5372f1e14e2a302e186d1753f9a649
或从此处复制并粘贴:
// Slack User Notification Preference Bulk Update
// By Mo Beigi
const slackTeamId = "EXAMPLE17";
const localConfigJson = JSON.parse(localStorage.localConfig_v2);
const slackUrl = localConfigJson.teams[slackTeamId].url;
let channel_ids = [];
// client.boot contains list of channel ids user is subscribed to amongst other things
await fetch(slackUrl + "api/client.boot?" +
"_x_id=noversion-1598950616.732" +
"&_x_version_ts=noversion" +
"&_x_gantry=true",
{
method: 'post',
credentials: 'include',
headers: { "Content-type": "application/x-www-form-urlencoded; charset=UTF-8" },
body: "token=" + localConfigJson.teams[slackTeamId].token +
"&only_self_subteams=1" +
"&flannel_api_ver=4" +
"&include_min_version_bump_check=1" +
"&version_ts=1598934919" +
"&_x_reason=deferred-data" +
"&_x_sonic=true",
},
)
.then(result => result.json())
.then(result => channel_ids = result.channels);
// iterate channel id list and set notification prefs asynchronously
let fetchPromises = [];
for (i = 0; i < channel_ids.length; ++i) {
console.log("Setting user notification prefs for channel id: " + channel_ids[i].id + " ...");
fetchPromises.push(
fetch(slackUrl + "api/users.prefs.setNotifications?" +
"_x_id=c189c956-1598949859.880" +
"&_x_csid=7dP2GCgBJsY" +
"&slack_route=" + localConfigJson.teams[slackTeamId].enterprise_id + ":" + slackTeamId +
"&_x_version_ts=1598934919" +
"&_x_gantry=true",
{
method: 'post',
credentials: 'include',
headers: { "Content-type": "application/x-www-form-urlencoded; charset=UTF-8" },
body: "name=suppress_at_channel" +
"&value=true" +
"&channel_id=" + channel_ids[i].id +
"&global=false" +
"&sync=false" +
"&token=" + localConfigJson.teams[slackTeamId].token +
"&_x_reason=prefs-store/setChannelNotificationOverride" +
"&_x_mode=online" +
"&_x_sonic=true"
}
)
.then(result => result.json())
.then(console.log("Done (" + channel_ids[i].id + ")"))
);
// Generous delay to get around rate limit
await new Promise(r => setTimeout(r, 250));
}
Promise.all(fetchPromises).then(function() {
console.log("Successfully set user notification prefs for " + channel_ids.length + " channels.");
});
JSON.parse(localStorage.localConfig_v2).teams
slackTeamId
。您现在应该在 @channel 和 @here 通知偏好设置中关闭所有频道。
答案 3 :(得分:0)
如果找不到取消选中“还包括@channel和@here”的选项,则可能首先需要取消静音该频道,然后在特定于频道的选项中,您可以取消选中“也包括@channel和@here”。
我不确定通道静音时复选框是否会生效,但是设置会通过静音和取消静音来保留。