-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the notification URL to chat posts #218
Conversation
Clean up notification post URLs a lot
@@ -434,7 +427,7 @@ module.exports = bookshelf.Model.extend({ | |||
post_title: decode(post.title() || ''), | |||
post_topic: firstTag, | |||
post_type: post.get('type'), | |||
post_url: Frontend.Route.tokenLogin(reader, token, this.postUrlHelper({ post, isPublic: false, topic: firstTag, group }) + '?ctt=post_email&cti=' + reader.id), | |||
post_url: Frontend.Route.tokenLogin(reader, token, Frontend.Route.post(post, group, 'ctt=post_email&cti=' + reader.id)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think this fixes #183 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, i doubt it, that sounds like a front end issue. but its not happening for me on dev
const tags = post.relations.tags | ||
const firstTopic = tags && tags.first()?.get('name') | ||
if (firstTopic && (post.get('type') === Post.Type.CHAT || group.hasChatFor(firstTopic))) { | ||
return url(`/groups/${groupSlug}/chat/${firstTopic}?postId=${post.id}&${extraParams}`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the main update needed for mobile that it needs to track /chat/
related urls?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I have that in a current branch
we need this on staging so im going to merge now |
Clean up notification post URLs a lot. Move all of it to Frontend.Route.post
Note, these URLs will have to be updated on mobile