Преглед изворни кода

kazoo: missing sender alternative for presence

lazedo пре 8 година
родитељ
комит
6525428887
1 измењених фајлова са 4 додато и 0 уклоњено
  1. 4 0
      src/modules/kazoo/kz_pua.c

+ 4 - 0
src/modules/kazoo/kz_pua.c

@@ -221,6 +221,10 @@ int kz_pua_publish_presence_to_presentity(struct json_object *json_obj) {
 	json_extract_field(BLF_JSON_ETAG, etag);
 	json_extract_field(BLF_JSON_ETAG, etag);
 	json_extract_field(BLF_JSON_SENDER, sender);
 	json_extract_field(BLF_JSON_SENDER, sender);
 
 
+	if (sender.len == 0) {
+		json_extract_field(BLF_JSON_SWITCH_URI, sender);
+	}
+
 	struct json_object* ExpiresObj = kz_json_get_object(json_obj, BLF_JSON_EXPIRES);
 	struct json_object* ExpiresObj = kz_json_get_object(json_obj, BLF_JSON_EXPIRES);
 	if (ExpiresObj != NULL) {
 	if (ExpiresObj != NULL) {
 		expires = json_object_get_int(ExpiresObj);
 		expires = json_object_get_int(ExpiresObj);