|  |  |  | @ -398,6 +398,17 @@ class LokiPublicChannelAPI { | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   // get moderation actions
 | 
		
	
		
			
				|  |  |  |  |   async pollForDeletions() { | 
		
	
		
			
				|  |  |  |  |     try { | 
		
	
		
			
				|  |  |  |  |       await this.pollOnceForDeletions(); | 
		
	
		
			
				|  |  |  |  |     } catch (e) { | 
		
	
		
			
				|  |  |  |  |       log.warn(`Error while polling for public chat deletions: ${e}`); | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |     setTimeout(() => { | 
		
	
		
			
				|  |  |  |  |       this.pollForDeletions(); | 
		
	
		
			
				|  |  |  |  |     }, DELETION_POLL_EVERY); | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   async pollOnceForDeletions() { | 
		
	
		
			
				|  |  |  |  |     // grab the last 200 deletions
 | 
		
	
		
			
				|  |  |  |  |     const params = { | 
		
	
		
			
				|  |  |  |  |       count: 200, | 
		
	
	
		
			
				
					|  |  |  | @ -435,15 +446,21 @@ class LokiPublicChannelAPI { | 
		
	
		
			
				|  |  |  |  |       this.deleteLastId = res.response.meta.max_id; | 
		
	
		
			
				|  |  |  |  |       ({ more } = res.response); | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     // set up next poll
 | 
		
	
		
			
				|  |  |  |  |     this.timers.delete = setTimeout(() => { | 
		
	
		
			
				|  |  |  |  |       this.pollForDeletions(); | 
		
	
		
			
				|  |  |  |  |     }, PUBLICCHAT_DELETION_POLL_EVERY); | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   // get channel messages
 | 
		
	
		
			
				|  |  |  |  |   async pollForMessages() { | 
		
	
		
			
				|  |  |  |  |     try { | 
		
	
		
			
				|  |  |  |  |       await this.pollOnceForMessages(); | 
		
	
		
			
				|  |  |  |  |     } catch (e) { | 
		
	
		
			
				|  |  |  |  |       log.warn(`Error while polling for public chat messages: ${e}`); | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |     setTimeout(() => { | 
		
	
		
			
				|  |  |  |  |       this.pollForMessages(); | 
		
	
		
			
				|  |  |  |  |     }, GROUPCHAT_POLL_EVERY); | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   async pollOnceForMessages() { | 
		
	
		
			
				|  |  |  |  |     const params = { | 
		
	
		
			
				|  |  |  |  |       include_annotations: 1, | 
		
	
		
			
				|  |  |  |  |       count: -20, | 
		
	
	
		
			
				
					|  |  |  | @ -469,7 +486,10 @@ class LokiPublicChannelAPI { | 
		
	
		
			
				|  |  |  |  |         if (adnMessage.is_deleted) { | 
		
	
		
			
				|  |  |  |  |           return; | 
		
	
		
			
				|  |  |  |  |         } | 
		
	
		
			
				|  |  |  |  |         if (adnMessage.annotations && adnMessage.annotations.length) { | 
		
	
		
			
				|  |  |  |  |         if ( | 
		
	
		
			
				|  |  |  |  |           Array.isArray(adnMessage.annotations) && | 
		
	
		
			
				|  |  |  |  |           adnMessage.annotations.length !== 0 | 
		
	
		
			
				|  |  |  |  |         ) { | 
		
	
		
			
				|  |  |  |  |           const noteValue = adnMessage.annotations[0].value; | 
		
	
		
			
				|  |  |  |  |           ({ timestamp } = noteValue); | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
	
		
			
				
					|  |  |  | @ -532,10 +552,6 @@ class LokiPublicChannelAPI { | 
		
	
		
			
				|  |  |  |  |       }); | 
		
	
		
			
				|  |  |  |  |       this.conversation.setLastRetrievedMessage(this.lastGot); | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |     this.timers.message = setTimeout(() => { | 
		
	
		
			
				|  |  |  |  |       this.pollForMessages(); | 
		
	
		
			
				|  |  |  |  |     }, PUBLICCHAT_MSG_POLL_EVERY); | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   // create a message in the channel
 | 
		
	
	
		
			
				
					|  |  |  | 
 |