include_for_logged_out_users should still work when user excluded #293
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Intercom devs! Please let me know what you think of this slight change in functionality.
The current behaviour when you have both
include_for_logged_out_users
anduser.exclude_if
set is a little counter-intuitive. The Intercom dialog appears when you're logged out, and when you're logged in as a valid user, but if you're logged in as an excluded user it disappears.I'm not sure if there's a use case for this default behaviour, but it seems to make more sense to me to continue showing the
include_for_logged_out_users
Intercom dialog for excluded users, if that option is enabled.This PR changes that - actually by removing a line from
IntercomRails::ScriptTag
. Excluded users still get no Intercom dialog at all ifinclude_for_logged_out_users
is false and I've made sure both cases are covered in the tests.If I've missed your use case, I can make this a separate config option... let me know what works best for you!