finish settings and public recordings

This commit is contained in:
Josh
2018-06-12 17:28:02 -04:00
parent 39b687a58f
commit 8390e075e1
14 changed files with 72 additions and 72 deletions

View File

@ -109,7 +109,7 @@ class Room < ApplicationRecord
end
end
# Fetches all recordings for a meeting.
# Fetches all recordings for a room.
def recordings
res = bbb.get_recordings(meetingID: bbb_id)
@ -130,6 +130,11 @@ class Room < ApplicationRecord
res[:recordings]
end
# Fetches a rooms public recordings.
def public_recordings
recordings.select do |r| r[:metadata]["gl-listed"] end
end
def update_recording(record_id, meta)
meta.merge!({recordID: record_id})

View File

@ -8,7 +8,8 @@ class User < ApplicationRecord
validates :name, length: { maximum: 24 }, presence: true
validates :provider, presence: true
validates :email, length: { maximum: 60 }, allow_nil: true,
validates :image, format: {with: /\.(png|jpg)\Z/i}, allow_blank: true
validates :email, length: { maximum: 60 }, allow_blank: true,
uniqueness: { case_sensitive: false },
format: {with: /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i }
@ -56,7 +57,7 @@ class User < ApplicationRecord
end
def twitter_image(auth)
auth['info']['image']
auth['info']['image'].gsub!("_normal", "")
end
def google_name(auth)
@ -72,7 +73,7 @@ class User < ApplicationRecord
end
def google_image(auth)
auth['info']['picture']
auth['info']['image']
end
end