mirror of
				https://gitlab.com/comunic/comunicapiv2
				synced 2025-11-03 19:14:03 +00:00 
			
		
		
		
	First private notification
This commit is contained in:
		@@ -79,9 +79,7 @@ export class NotificationsHelper {
 | 
			
		||||
		if(await this.SimilarExists(n))
 | 
			
		||||
			return;
 | 
			
		||||
		
 | 
			
		||||
 | 
			
		||||
		throw new Error("Create the notification!")
 | 
			
		||||
		//await this.Create(n)
 | 
			
		||||
		await this.Create(n)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
@@ -97,6 +95,18 @@ export class NotificationsHelper {
 | 
			
		||||
		}) > 0;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Create the notification
 | 
			
		||||
	 * 
 | 
			
		||||
	 * @param n The notification
 | 
			
		||||
	 */
 | 
			
		||||
	private static async Create(n: Notif) {
 | 
			
		||||
		await DatabaseHelper.InsertRow(
 | 
			
		||||
			NOTIFICATIONS_TABLE, 
 | 
			
		||||
			this.NotifToDB(n, true)
 | 
			
		||||
		)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Count the number of unread notifications of a user
 | 
			
		||||
	 * 
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user