Map<String, Object?> toJson() => { if (singleThread != null) 'singleThread': singleThread, 'threadId': threadId, };