SendUserMsg static method

void SendUserMsg(
  1. int id,
  2. String msg
)

发送消息给用户

Implementation

static void SendUserMsg(int id,String msg) async {
 Log.i(tag, "SendUserMsg id: $id msg: $msg");
 if (checkIsOnline()) {
   if(checkHasUser(id)){
     PlatformMethodInvokeHandler.invokeMethod("SendUserMsg", [id.toString(), msg]);
     if(!msg.toLowerCase().startsWith("sos")){
       SendChat(id, msg, 0, 1001);
     }
   }
 }
}