I have been updated some featured/pinned topics and they seem to be sending out updates every time that I update them. Is there a way to disable this? “Watch first Post” shouldn’t trigger if the post is just slightly edited as far as I can tell?
What do you mean by “I have been updated”? What exactly did you do, step by step? Describe it in detail? Your question is unanswerable until you provide this information.
Edits don’t alert anyone in Discourse.. ever, that I can think of. You will be notified if someone else edits your post by default, using the typical Discourse notifications.
Edits notify the original author. I get notifications when @codinghorror fixes my posts with alarming frequency. (I don’t think it’s what this person is describing, but it is edits giving notifications)
Sorry fort he lack of clarity.
For some reason, editing a post that I created would notify other users of the edit. It appears that it occurred in topics that used the tagging of a group and that group would be notified (even if the tag was not a new one).
Create a post with multiple tags of groups of members
Let it propagate and send notifications. Wait whatever number of minutes is needed for it to send out to any current watch lists/etc.
Come back to the post and edit it.
Add something useless, like the word unicorn and note that the right hand side of the edit window alerts that you will notify the groups in the post despite not having added or edited anything to do with those tags.
Save
Check the logs and note that all members in those groups are now notified of the edit (though the notifications appear as a New Topic notification.
I have not been able to repro this. I tested it on try, with 3 users. In one post I mentioned all of them individually, in the other I mentioned a group all 3 were in. They all received the initial mention notification, they did not receive further notifications on edit.
I’m unsure about the type of notification here. Are you referring to a notification that appears on your user profile, i.e., as an extra entry in the list that appears when you click on your avatar up right?
Or is it a small blue dot next to the topic title in the topic list?
음 @Grayden_Shand 게시글이 수정되기 전에 이미 해당 그룹이 언급되어 있었다고 가정하고 있습니다. 수정을 통해 게시글에 새로운 멘션을 추가하면 해당 사용자/그룹에게 알림이 전송된다는 점은 알고 있습니다.
두 가지 시나리오를 테스트해 보았습니다:
이미 그룹이 언급된 게시글에 '닌자 편집’을 수행하면 편집 중 경고가 표시되지만, 닌자 편집이 완료된 후 알림은 전송되지 않습니다.
편집 유예 기간이 지난 후에 편집을 수행하면 편집 중 경고가 표시되지만, 그룹에 새로운 알림은 전송되지 않습니다.
추가적인 재현 단계를 알려주실 수 있을까요?
참고로, 게시글 수준에서 멘션이 알림을 트리거하는지 여부를 제어할 수 있는 토글이 있으면 도움이 될 것 같다는 생각이 듭니다. 이는 편집 시나리오에서 더 많은 제어권을 제공하며, 단순히 다른 사용자가 활용할 수 있는 마법 사용자 카드/프로필 링크를 게시글에 포함시키고 싶을 때에도 유용할 것입니다.
게시글 수정을 통해 멘션 알림을 보내는 기능은 저와 다른 사용자들도 가끔씩 사용하는 중요한 기능이므로 이 기능은 유지되어야 하지만, 현재 그룹과의 연동 방식은 어색하게 느껴집니다.
제 현재 의견은 게시글당 그룹 알림을 한 번만 보내야 한다는 것입니다. 처음 그룹 멘션이 이루어진 이후에 그룹에 추가된 사용자는 이후의 게시글 수정으로 인해 그룹 멘션 알림을 받지 않아야 합니다. 게시글이 마지막으로 저장된 이후로 새로운 그룹 멘션이 없다면 게시글 편집 중 그룹 알림에 대한 JIT 교육 배너는 표시되지 않아야 합니다.
이전에 멘션되지 않았던 그룹이 수정 과정에서 멘션되면, 해당 그룹에는 알림이 전송되어야 합니다. 이는 사용자 멘션의 동작 방식과 동일합니다. 새롭게 멘션된 그룹이 있다면 관련 교육 배너도 표시되어야 합니다.
group_mentions 테이블에 레코드가 존재하는지에 기반한 조건 분기 로직을 추가하면 될 것 같습니다. 우리는 게시글 저장 시점에 레코드를 생성합니다.
이와 관련된 코드를 몇 가지 살펴봤는데(@tshenry 님, 링크 감사합니다), 그렇게까지 복잡할 필요는 없어 보입니다.
현재 그룹 멘션은 여기(L78-80)에서 트리거되고 있습니다. expand_group_mentions() 함수는 그룹 멘션 알림을 받아야 할 사용자를 출력하는 생성기(generator) 역할을 하며(SiteSetting.max_users_notified_per_group_mention와 같은 정책을 준수하면서) 수행됩니다.
이곳이 해당 로직을 넣기에 자연스러운 위치로 보입니다.
create_notification 함수에서 이미 동일한 유형의 알림을 받은 사용자에게는 알림을 억제(suppress)합니다. 이것이 그룹 멘션이 포함된 게시물을 편집할 때 새로운 그룹 멤버에게 알림이 트리거되는 이유입니다. 실제로는 그룹 내 모든 사용자에게 알림이 생성되지만, 이미 알림을 받은 사람들에게는 억제되는 것입니다.
저는 expand_group_mentions() 함수를 업데이트하여 group_mentions 테이블에 기록이 있는 그룹도 필터링하도록 하는 유사한 방식을 제안합니다.
다음과 같은 형태일 것입니다(루비 문법에 대한 제 무지를 양해해 주세요)
def expand_group_mentions(groups, post)
return unless post.user && groups
Group.mentionable(post.user, include_public: false).where(id: groups.map(&:id)).each do |group|
next if group.user_count >= SiteSetting.max_users_notified_per_group_mention
# 이미 멘션된 그룹에 대한 체크 추가
next if GroupMentions().where(group_id: group.id, post_id: post.id).length > 0
yield group, group.users
end
end