live dm action

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2026-01-03 10:44:55 +08:00
parent b2da99e334
commit bcacc41db3
9 changed files with 202 additions and 31 deletions

View File

@@ -160,11 +160,27 @@ class _ReplyPageState extends CommonRichTextPubPageState<LiveSendDmPanel> {
int? dmType,
emoticonOptions,
}) async {
int replyMid = 0;
String replyDmid = '';
if (message == null) {
final buffer = StringBuffer();
for (final e in editController.items) {
if (e.type == .at) {
replyMid = int.parse(e.rawText);
replyDmid = e.id!;
} else {
buffer.write(e.rawText);
}
}
message = buffer.toString();
}
final res = await LiveHttp.sendLiveMsg(
roomId: liveRoomController.roomId,
msg: message ?? editController.rawText,
msg: message,
dmType: dmType,
emoticonOptions: emoticonOptions,
replyMid: replyMid,
replayDmid: replyDmid,
);
if (res.isSuccess) {
hasPub = true;