Sorted. This is now with the original author who can take this forward.
Thanks for sorting that out.
@ganncamp
I’ve fixed the immediate issue. There’s one caveat though. Currently the Discourse backend only supports staff users to be able to switch a post’s post_type
so I have made the toggle icon to to appear if a user is in
whispers_allowed_groups
and also a staff member. Do let us know your thoughts on this.
I appreciate the effort. I came up with came up with a solution which reduces the complexity a bit. Also thanks for pointing out the actual cause.
That’s fine for us; only staff can see whispers.
And… I’m not seeing this on my instance yet…?
And now it works! Thanks!
Breaking change on new version of discourse
I recently ran into the same problem as well, so I rewrote the component and made a PR. Pull requests · fzngagan/discourse-toggle-whisper
@fzngagan Can you take a look at it?
Just tested it and it works like a charm. The code looks nice too. Thanks so much for this, it save me a bunch of work. Merged
I made a quick PR to fix the issue (@fzngagan)
The toggle whisper icon is not appearing on our site anymore, we are running on 3.4.1. Anyone else having same issue?
@fzngagan heads up on a 404 link here:
There’s a potential leak here whereby some users can still visibly see the whispered posts.
Steps to replicate:
- Without whispering, reply direct to or quote a user in a post/reply
- Change the post to a whisper
- The @mentioned / @quoted user can still visibly see the whispered post
I don’t think I can repro that?
My step by step just to see if I’m doing a
- Test_One creates post by directly replying to Test_Two
- Also throws in a quote of Test_Three and an @mention of Test_Four
- As admin, toggle that post into a whisper
The only people who can see the whisper are Admin and Test_One (which is expected, as you can see your own whisper posts even after you can no longer create whispers) [this has since been fixed see below]
Is it a page refresh thing?
I’ll check with my colleague who reported the issue to confirm, but:
Is Test_One an admin?
No, just a normal non-staff user.
Does it need to be an admin and/or mod?
ETA: re-running the test using an admin to create the direct reply (with quote + mention) seems to be offering similar results.
There is a ux oddity in that each of these test users got a notification for the respective things, and when followed the post was no longer there for them to see.
There’s also another ux one for the expandable ‘x replies’ box where the count includes the whisper, but doesn’t show it when expanded.
Unsure, we’ll do some more testing and report back, thanks
This is now no longer the case