public Im OpenIm() { var im = SlackInstance.Ims.FirstOrDefault(i => i.User == this.Id); if (im == null) { var r = SlackInstance.Api("im.open", new JProperty("user", this.Id)); im = new Im(); im.Id = r["channel"]["id"].Value<string>(); im.User = this.Id; SlackInstance.Ims.Add(im); } return im; }
public Im OpenIm() { var im = SlackInstance.Ims.FirstOrDefault(i => i.User == this.Id); if (im == null) { var r = SlackInstance.Api("im.open", new JProperty("user", this.Id)); im = new Im(); im.Id = r["channel"]["id"].Value <string>(); im.User = this.Id; SlackInstance.Ims.Add(im); } return(im); }