mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 19:14:42 +08:00
live dm action
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user