mirror of
https://github.com/fly-apps/live_beats.git
synced 2024-11-21 15:41:00 +00:00
Fix username not updating on presence when settings changed
This commit is contained in:
parent
83db1294f9
commit
5ce9142253
1 changed files with 7 additions and 0 deletions
|
@ -249,6 +249,13 @@ defmodule LiveBeatsWeb.PlayerLive do
|
|||
end
|
||||
|
||||
def handle_info({MediaLibrary, %MediaLibrary.Events.PublicProfileUpdated{} = update}, socket) do
|
||||
%{current_user: current_user} = socket.assigns
|
||||
|
||||
if update.profile.user_id == socket.assigns.current_user.id do
|
||||
LiveBeats.PresenceClient.untrack(socket.assigns.profile, current_user.id)
|
||||
LiveBeats.PresenceClient.track(update.profile, current_user.id)
|
||||
end
|
||||
|
||||
{:noreply, assign_profile(socket, update.profile)}
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue