kwailo888 / AxolotlTestApp

9 stars 3 forks source link

SendMessageReceived and SendAvailableForChat #23

Open ffwblueshadow opened 8 years ago

ffwblueshadow commented 8 years ago

At first, i added the function SendMessageBroadcastLocation.

But i have some questions for the login: Every time after the logging procedure, the client was available. so i create the WhatsApp with the value "hidden = true", but it was still available

public WhatsApp(string phoneNum, string imei, string nick, bool debug = false, bool hidden = false);

The logging procedure is sending

this.SendAvailableForChat(this.name, this.hidden);

 public void SendAvailableForChat(string nickName = null, bool isHidden = false)
        {
                 var node = new ProtocolTreeNode("presence", new[] { new KeyValue("name", (!String.IsNullOrEmpty(nickName) ? nickName : this.name)) });
                this.SendNode(node);

        }

But the value "isHidden" is never checked?! Is it a issue or correct?


Every time the API receives a messages, it is immediately marked as read?!

WhatsSendBase.cs:378 this.sendMessageReceived(node); WhatsSendBase.cs:608 protected void sendMessageReceived(ProtocolTreeNode msg, string type = "read")

It should be checked whether the client is active or inactive. I'm right?