onReceiveMetaMessage method

dynamic onReceiveMetaMessage(
  1. Map<String, dynamic> message
)

Implementation

onReceiveMetaMessage(Map<String, dynamic> message) async {
  // when the space isnt joined we dont act on the recieved meta messages
  if (data.spaceId == '') return;

  final result = await onReceiveMetaMessage_(
      message: message,
      spaceId: data.spaceId,
      handleJoinOnPromotion: () {
        _setPlaybackUrl(null);
        join(spaceId: data.spaceId);
      },
      handleCompletePromotionInvite: ({required String inviteeAddress}) {
        _completePromotionInvite(inviteeAddress: inviteeAddress);
      },
      handleRemovePromotionInvite: ({required String inviteeAddress}) {
        _pendingInvites.remove(inviteeAddress);
      });

  if (result != null) {
    data = result;
    notifyListeners();
  }
}