forked from mirrors/linphone-iphone
add header to discriminate chat room list subscription
This commit is contained in:
parent
8edcc9f71f
commit
198ea9fbac
2 changed files with 10 additions and 1 deletions
|
|
@ -2163,7 +2163,7 @@ static void linphone_core_internal_notify_received(LinphoneCore *lc, LinphoneEve
|
|||
}
|
||||
|
||||
static void _linphone_core_conference_subscribe_received(LinphoneCore *lc, LinphoneEvent *lev, const LinphoneContent *body) {
|
||||
if (body) {
|
||||
if (body && strcasecmp(linphone_content_get_custom_header(body, "Content-Disposition"), "recipient-list") == 0) {
|
||||
// List subscription
|
||||
L_GET_PRIVATE_FROM_C_OBJECT(lc)->localListEventHandler->subscribeReceived(lev, body);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -96,6 +96,15 @@ void RemoteConferenceListEventHandler::subscribe () {
|
|||
bctbx_free(from);
|
||||
linphone_address_unref(rlsAddr);
|
||||
linphone_event_set_internal(lev, TRUE);
|
||||
linphone_event_add_custom_header(lev, "Require", "recipient-list-subscribe");
|
||||
linphone_event_add_custom_header(lev, "Accept", "multipart/related, application/conference-info+xml, application/rlmi+xml");
|
||||
linphone_event_add_custom_header(lev, "Content-Disposition", "recipient-list");
|
||||
/* TODO: enable compression
|
||||
if (linphone_core_content_encoding_supported(lc, "deflate")) {
|
||||
content.setContentEncoding("deflate");
|
||||
linphone_event_add_custom_header(lev, "Accept-Encoding", "deflate");
|
||||
}
|
||||
*/
|
||||
linphone_event_set_user_data(lev, this);
|
||||
linphone_event_send_subscribe(lev, content.toLinphoneContent());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue