mirror of
				https://gitlab.com/comunic/comunicapiv2
				synced 2025-11-04 03:24:04 +00:00 
			
		
		
		
	First private notification
This commit is contained in:
		@@ -79,9 +79,7 @@ export class NotificationsHelper {
 | 
				
			|||||||
		if(await this.SimilarExists(n))
 | 
							if(await this.SimilarExists(n))
 | 
				
			||||||
			return;
 | 
								return;
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
 | 
							await this.Create(n)
 | 
				
			||||||
		throw new Error("Create the notification!")
 | 
					 | 
				
			||||||
		//await this.Create(n)
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/**
 | 
						/**
 | 
				
			||||||
@@ -97,6 +95,18 @@ export class NotificationsHelper {
 | 
				
			|||||||
		}) > 0;
 | 
							}) > 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
 | 
						 * Count the number of unread notifications of a user
 | 
				
			||||||
	 * 
 | 
						 * 
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user