mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-11-04 04:04:20 +00:00 
			
		
		
		
	Can delete a group conversation
This commit is contained in:
		@@ -350,12 +350,17 @@ const GroupSettingsPage = {
 | 
			
		||||
		Vue.createApp({
 | 
			
		||||
			data: () => {
 | 
			
		||||
				return {
 | 
			
		||||
					conversations: settings.conversations,
 | 
			
		||||
					newConvName: "",
 | 
			
		||||
					newConvVisibility: "member"
 | 
			
		||||
				}
 | 
			
		||||
			},
 | 
			
		||||
 | 
			
		||||
			methods: {
 | 
			
		||||
 | 
			
		||||
				/**
 | 
			
		||||
				 * Create a new conversation
 | 
			
		||||
				 */
 | 
			
		||||
				createNewConv: async function() {
 | 
			
		||||
					try {
 | 
			
		||||
						const convName = this.newConvName;
 | 
			
		||||
@@ -374,6 +379,27 @@ const GroupSettingsPage = {
 | 
			
		||||
						console.error(e)
 | 
			
		||||
						notify(tr("Failed to create group conversation!"), "danger")
 | 
			
		||||
					}
 | 
			
		||||
				},
 | 
			
		||||
 | 
			
		||||
				/**
 | 
			
		||||
				 * Delete a conversation
 | 
			
		||||
				 */
 | 
			
		||||
				deleteConv: async function(convID) {
 | 
			
		||||
					try {
 | 
			
		||||
						if (!await showConfirmDialog("Do you really want to delete this conversation ?"))
 | 
			
		||||
							return;
 | 
			
		||||
 | 
			
		||||
						await GroupsInterface.deleteGroupConversation(convID)
 | 
			
		||||
						
 | 
			
		||||
						notify("The conversation was successfully deleted!", "success")
 | 
			
		||||
 | 
			
		||||
						Page.refresh_current_page();
 | 
			
		||||
					}
 | 
			
		||||
					
 | 
			
		||||
					catch(e) {
 | 
			
		||||
						console.error(e)
 | 
			
		||||
						notify(tr("Failed to delete group conversation!"), "danger")
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}).mount(conversationsSettingsTarget);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user