JsonObject MakePresence() { JsonObject activity = new JsonObject() { { "name", GetStatus() }, { "type", 0 } }; JsonObject obj = new JsonObject() { { "since", null }, { "activities", new JsonArray() { activity } }, { "status", Status.ToString() }, { "afk", false } }; return(obj); }
private void comboBoxStatus_SelectionChanged(object sender, SelectionChangedEventArgs e) { PresenceStatus status = (this.comboBoxStatus.SelectedValue as Status).Value; this.configurationService.Set(Configuration.ConfFolder.RCS, Configuration.ConfEntry.STATUS, status.ToString()); if (this.sipService.IsPublicationEnabled) { this.sipService.PresencePublish(status); } }