Skip to content

Commit

Permalink
Merge pull request #1108 from PlanoramaEvents/development
Browse files Browse the repository at this point in the history
3.7.0-rc3
  • Loading branch information
balen authored Jun 26, 2024
2 parents b8e42b2 + b43f9fd commit 571ee52
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
13 changes: 11 additions & 2 deletions app/controllers/rce_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,24 @@ def generate_csv(sessions)
# If the room is not an online room or an RCE stage then there is no online audience
next unless session.room.integrations["rce"] && session.room.integrations["rce"]["SegmentType"]

description = session.description
segmentType = session.room.integrations["rce"] ? session.room.integrations["rce"]["SegmentType"] : "sessions"
if segmentType != "stage"
description = ActionView::Base.full_sanitizer.sanitize(description)
end

csv << [
session.start_time.strftime("%Y-%m-%d"),
session.start_time.strftime("%H:%M"),
(session.start_time + session.duration.minutes).strftime("%Y-%m-%d"),
(session.start_time + session.duration.minutes).strftime("%H:%M"),
session.title,
session.description, # HTML may be an issue ...
# if the session is a "session" then strip the HTML
description, # HTML may be an issue ...
# Segment Name
session.title,
session.room.integrations["rce"] ? session.room.integrations["rce"]["SegmentType"] : "sessions",
# Segment Type
segmentType,
# Areas and tags
"#{session.area_list.sort.join(', ')}, #{session.tag_list&.join(', ')}", # Tags may be new line seperated?
'regular'
Expand Down
18 changes: 8 additions & 10 deletions app/serializers/conclar/session_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -138,23 +138,21 @@ class Conclar::SessionSerializer < ActiveModel::Serializer
res = if object.room.integrations["rce"]["SegmentType"] == "stage"
{
stage: "#{instance_options[:g24rce]}deep-link/stage?room_id=#{object.room.id}",
chat: "#{instance_options[:g24rce]}deep-link/chat?room_id=#{object.room.id}",
replay: "#{instance_options[:g24rce]}deep-link/replay?item_id=#{object.id}",
}
else # session
{
session: "#{instance_options[:g24rce]}deep-link/session?item_id=#{object.id}",
chat: "#{instance_options[:g24rce]}deep-link/chat?item_id=#{object.id}",
replay: "#{instance_options[:g24rce]}deep-link/replay?item_id=#{object.id}"
session: "#{instance_options[:g24rce]}deep-link/session?item_id=#{object.id}"
}
end
end
end
# If the session requires signup then put in a link
# TBD: waiting on programme to decide if they want to do this
# if object.require_signup
# res[:signup] = "#{instance_options[:g24rce]}deep-link/replay?item_id=#{object.id}"
# end

# replay link for recorded session
if object.recorded
res[:replay] = "#{instance_options[:g24rce]}deep-link/replay?item_id=#{object.id}"
end

res[:chat] = "#{instance_options[:g24rce]}deep-link/chat?item_id=#{object.id}"
res
end
end
Expand Down

0 comments on commit 571ee52

Please sign in to comment.