Added toots!
This commit is contained in:
		
							parent
							
								
									011ec2c9a8
								
							
						
					
					
						commit
						65cebc37ac
					
				
							
								
								
									
										5
									
								
								reply.py
								
								
								
								
							
							
						
						
									
										5
									
								
								reply.py
								
								
								
								
							| 
						 | 
					@ -53,11 +53,16 @@ class ReplyListener(mastodon.StreamListener):
 | 
				
			||||||
				for user in validusers:
 | 
									for user in validusers:
 | 
				
			||||||
					if user["id"] == notification["account"]["id"]: #user is #valid
 | 
										if user["id"] == notification["account"]["id"]: #user is #valid
 | 
				
			||||||
						print("User is valid")
 | 
											print("User is valid")
 | 
				
			||||||
 | 
											visibility = notification['status']['visibility']
 | 
				
			||||||
 | 
											if visibility == "public":
 | 
				
			||||||
 | 
												visibility = "unlisted"
 | 
				
			||||||
						if mention == "pin":
 | 
											if mention == "pin":
 | 
				
			||||||
							print("pin received, pinning")
 | 
												print("pin received, pinning")
 | 
				
			||||||
							client.status_pin(pin)
 | 
												client.status_pin(pin)
 | 
				
			||||||
 | 
												client.status_post("Toot pinned!", post_id, visibility=visibility spoiler_text = cfg['cw'])
 | 
				
			||||||
						else:
 | 
											else:
 | 
				
			||||||
							print("unpin received, unpinning")
 | 
												print("unpin received, unpinning")
 | 
				
			||||||
 | 
												client.status_post("Toot Unpinned!", post_id, visibility=visibility spoiler_text = cfg['cw'])
 | 
				
			||||||
							client.status_unpin(pin)
 | 
												client.status_unpin(pin)
 | 
				
			||||||
					else:
 | 
										else:
 | 
				
			||||||
						print("User is not valid")
 | 
											print("User is not valid")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in New Issue