sendAction method
Implementation
@override
void sendAction(String contactPubsubToken, DOOActionType actionType) {
final DOOAction action;
final identifier = jsonEncode(
{"channel": "RoomChannel", "pubsub_token": contactPubsubToken});
switch (actionType) {
case DOOActionType.subscribe:
action = DOOAction(identifier: identifier, command: "subscribe");
break;
default:
action = DOOAction(
identifier: identifier,
data: DOOActionData(action: actionType),
command: "message");
break;
}
connection?.sink.add(jsonEncode(action.toJson()));
}