operatorOf method
- String threadId
The effective operator of the thread threadId: its own operator, else its channel's.
Implementation
String? operatorOf(String threadId) {
final thread = threads[threadId]!;
final own = thread['operator_agent_id'] as String?;
if (own != null) return own;
final channel = channels[thread['channel_id']! as String]!;
return (channel.json['operator'] as JsonMap?)?['effective_agent_id']
as String?;
}