This commit is contained in:
		
							parent
							
								
									24d7700094
								
							
						
					
					
						commit
						7bb19f5b9b
					
				
					 2 changed files with 15 additions and 0 deletions
				
			
		| 
						 | 
					@ -54,6 +54,13 @@ export default function(type, data): Notification {
 | 
				
			||||||
				icon: data.user.avatar_url + '?thumbnail&size=64'
 | 
									icon: data.user.avatar_url + '?thumbnail&size=64'
 | 
				
			||||||
			};
 | 
								};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							case 'othello_invited':
 | 
				
			||||||
 | 
								return {
 | 
				
			||||||
 | 
									title: '対局への招待があります',
 | 
				
			||||||
 | 
									body: `${data.parent.name}さんから`,
 | 
				
			||||||
 | 
									icon: data.parent.avatar_url + '?thumbnail&size=64'
 | 
				
			||||||
 | 
								};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		default:
 | 
							default:
 | 
				
			||||||
			return null;
 | 
								return null;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -150,5 +150,13 @@ function registerNotifications(stream: HomeStreamManager) {
 | 
				
			||||||
			};
 | 
								};
 | 
				
			||||||
			setTimeout(n.close.bind(n), 7000);
 | 
								setTimeout(n.close.bind(n), 7000);
 | 
				
			||||||
		});
 | 
							});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							connection.on('othello_invited', matching => {
 | 
				
			||||||
 | 
								const _n = composeNotification('othello_invited', matching);
 | 
				
			||||||
 | 
								const n = new Notification(_n.title, {
 | 
				
			||||||
 | 
									body: _n.body,
 | 
				
			||||||
 | 
									icon: _n.icon
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
 | 
							});
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue