Skip to content
Snippets Groups Projects
Commit bd8b2b7f authored by Jacob Vosmaer (GitLab)'s avatar Jacob Vosmaer (GitLab)
Browse files

Default last_fetched_at to 0 for old clients

Users who have not refreshed their browser tab will poll GitLab using
outdated JS. This change makes the server fall back to the old behavior
(send all comments) for old clients, instead of throwing an exception
for old clients.
parent c6850249
No related branches found
No related tags found
1 merge request!6949gitlab.com issue #229 - no_avatar.png path in coffee
Loading
Loading
@@ -4,7 +4,8 @@ class NotesFinder
def execute(project, current_user, params)
target_type = params[:target_type]
target_id = params[:target_id]
last_fetched_at = Time.at(params.fetch(:last_fetched_at).to_i)
# Default to 0 to remain compatible with old clients
last_fetched_at = Time.at(params.fetch(:last_fetched_at, 0).to_i)
 
notes = case target_type
when "commit"
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment