Progress on little important things

removing .mov for now until we can figure out solution with videojs, added model to track username changes, got chat creation flow down, progress on bookmark collections, albums, filtering blocks/mutes from group, explore, collection timelines
This commit is contained in:
mgabdev
2020-12-22 01:36:38 -05:00
parent 2bbb5be505
commit 6fbea0a59e
37 changed files with 406 additions and 135 deletions

View File

@@ -24,11 +24,12 @@ class Settings::ProfilesController < Settings::BaseController
flash[:alert] = 'Unable to change username for your account. You are not GabPRO'
redirect_to settings_profile_path
else
# : todo :
# only allowed to change username once per day
if params[:account][:username] && @account.username != params[:account][:username]
Redis.current.set("username_change:#{account.id}", true)
Redis.current.expire("username_change:#{account.id}", 24.huors.seconds)
if @account.username != params[:account][:username]
AccountUsernameChange.create!(
account: @account,
from_username: @account.username,
to_username: params[:account][:username]
)
end
if UpdateAccountService.new.call(@account, account_params)