mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 00:49:16 +02:00
Basic working poc with favorites send over websocket
This commit is contained in:
parent
e490284511
commit
d509c090d3
7 changed files with 29 additions and 28 deletions
|
@ -8,10 +8,12 @@ record.registry.register_serializer(
|
|||
|
||||
|
||||
@record.registry.register_consumer('favorites.TrackFavorite')
|
||||
def broadcast_track_favorite_to_instance_timeline(data, obj):
|
||||
def broadcast_track_favorite_to_instance_activity(data, obj):
|
||||
if obj.user.privacy_level not in ['instance', 'everyone']:
|
||||
return
|
||||
channels.group_send('instance_timeline', {
|
||||
'type': 'event',
|
||||
|
||||
channels.group_send('instance_activity', {
|
||||
'type': 'event.send',
|
||||
'text': '',
|
||||
'data': data
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue