Revision 27789968 plugins/janus_textroom.c

View differences:

plugins/janus_textroom.c
804 804
		}
805 805
		g_free(msg_text);
806 806
		janus_mutex_unlock(&textroom->mutex);
807
		/* Should we send ack event? Yes if no ack field provided, else follow field directive */
807
		/* By default we send a confirmation back to the user that sent this message:
808
		 * if the user passed an ack=false, though, we don't do that */
808 809
		json_t *ack = json_object_get(root, "ack");
809 810
		if(!internal && (ack == NULL || json_is_true(ack))) {
810 811
			/* Send response back */
811 812
			char *reply_text = json_dumps(reply, JSON_INDENT(3) | JSON_PRESERVE_ORDER);
812
			json_decref(reply);
813 813
			gateway->relay_data(handle, reply_text, strlen(reply_text));
814 814
			g_free(reply_text);
815 815
		}
816
		json_decref(reply);
816 817
	} else if(!strcasecmp(request_text, "join")) {
817 818
		JANUS_VALIDATE_JSON_OBJECT(root, join_parameters,
818 819
			error_code, error_cause, TRUE,

Also available in: Unified diff