editComment method
Implementation
@Deprecated('user commentEdit()')
Future<ApiComment> editComment({
content = '',
List<ApiFile>? files,
required ApiPost post,
ApiComment? parent,
ApiComment? comment,
}) async {
final data = {
'route': 'forum.editComment',
'comment_post_ID': post.idx,
// if (comment != null && comment.commentId != null && comment.commentId != '')
// 'comment_ID': comment.commentId,
// if (parent != null) 'comment_parent': parent.commentId,
// 'comment_content': content ?? '',
};
if (files != null) {
Set ids = files.map((file) => file.idx).toSet();
data['files'] = ids.join(',');
}
final json = await request(data);
return ApiComment.fromJson(json);
}