Added option to add reactions to talk messages

This commit is contained in:
2023-07-09 19:38:09 +02:00
parent 0b2fab5b6d
commit 2ddaa17a81
9 changed files with 188 additions and 11 deletions

View File

@ -0,0 +1,26 @@
import 'package:http/http.dart' as http;
import 'package:http/http.dart';
import '../../../apiParams.dart';
import '../talkApi.dart';
import 'reactMessageParams.dart';
class ReactMessage extends TalkApi {
String chatToken;
int messageId;
ReactMessage({required this.chatToken, required this.messageId, required ReactMessageParams params}) : super("v1/reaction/$chatToken/$messageId", params);
@override
assemble(String raw) {
}
@override
Future<Response>? request(Uri uri, ApiParams? body, Map<String, String>? headers) {
if(body is ReactMessageParams) {
return http.post(uri, headers: headers, body: body.toJson());
}
return null;
}
}