private async void OnUsersChanged(object sender, UserChangedEventArgs args) { UserChangedNotification notification = new UserChangedNotification(); notification.Type = NotificationType.UserChanged; notification.NewUser = args.NewUser; notification.OldUser = args.OldUser; await BroadcastAsync(notification); }
private void OnUserAddedToDataStore(object sender, UserChangedEventArgs args) { _stream.PauseStream(); if (args.NewUser != null) { _stream.AddFollow(args.NewUser.Id); } if (args.OldUser != null) { _stream.RemoveFollow(args.OldUser.Id); } _stream.ResumeStream(); }