mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	Add channel module wrapping our various JSON requests to the server.
(imported from commit 6489938678551ad8594822363ae6d1c9ae295496)
This commit is contained in:
		@@ -684,13 +684,11 @@ function hack_for_floating_recipient_bar() {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function update_message_flag(messages, flag_name, set_flag) {
 | 
			
		||||
    $.ajax({
 | 
			
		||||
        type: 'POST',
 | 
			
		||||
    channel.post({
 | 
			
		||||
        url: '/json/update_message_flags',
 | 
			
		||||
        data: {messages: JSON.stringify(_.pluck(messages, 'id')),
 | 
			
		||||
               op: set_flag ? 'add' : 'remove',
 | 
			
		||||
               flag: flag_name},
 | 
			
		||||
        dataType: 'json'});
 | 
			
		||||
               flag: flag_name}});
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function change_message_collapse(message, collapsed) {
 | 
			
		||||
@@ -1603,11 +1601,9 @@ $(function () {
 | 
			
		||||
                return;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            $.ajax({
 | 
			
		||||
                type:     'POST',
 | 
			
		||||
            channel.post({
 | 
			
		||||
                url:      "/accounts/webathena_kerberos_login/",
 | 
			
		||||
                data:     {cred: JSON.stringify(r.session)},
 | 
			
		||||
                dataType: 'json',
 | 
			
		||||
                success: function (data, success) {
 | 
			
		||||
                    $("#zephyr-mirror-error").hide();
 | 
			
		||||
                },
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user