Skip to content

Commit

Permalink
Merge branch 'EN-7354-openai-matching' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-entourage committed Dec 3, 2024
2 parents d52375a + 9fc442f commit f8a4793
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion app/controllers/admin/entourages_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,11 @@ def show_siblings

def send_matching
@matching = Matching.find(params[:matching_id])
@matching.inapp_notification_exists_virtual = @matching.inapp_notification_exists?(@matching.instance.user)

PushNotificationTrigger.new(@matching, :forced_create, Hash.new).run

@matching.inapp_notification_exists_virtual = @matching.inapp_notification_exists?(@matching.instance.user)

respond_to do |format|
format.js
end
Expand Down
2 changes: 1 addition & 1 deletion app/models/matching.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ def inapp_notification_exists
end

def inapp_notification_exists? user
InappNotification.exists?(user: user, instance_baseclass: instance_type, instance_id: instance_id, context: :matching)
InappNotification.exists?(user: user, instance_baseclass: match_type, instance_id: match_id, context: [:matching_on_create, :matching_on_forced_create])
end
end
2 changes: 1 addition & 1 deletion app/views/admin/entourages/show/_show_matchings.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<tbody>
<% @matchings.each do |matching| %>
<tr>
<tr id="matching-<%= matching.id %>">
<td><%= matching.match_type %></td>
<td><%= link_to matching.match.name, [:admin, matching.match] %></td>
<td>
Expand Down

0 comments on commit f8a4793

Please sign in to comment.