mirror of https://gitlab.com/bashrc2/epicyon
				
				
				
			Snake case
							parent
							
								
									a151710ce2
								
							
						
					
					
						commit
						35f3eaa321
					
				| 
						 | 
				
			
			@ -24,7 +24,7 @@ from utils import getFullDomain
 | 
			
		|||
from utils import removeIdEnding
 | 
			
		||||
from utils import getDomainFromActor
 | 
			
		||||
from utils import dangerousMarkup
 | 
			
		||||
from utils import isFeaturedWriter
 | 
			
		||||
from utils import is_featured_writer
 | 
			
		||||
from utils import loadJson
 | 
			
		||||
from utils import saveJson
 | 
			
		||||
from utils import acct_dir
 | 
			
		||||
| 
						 | 
				
			
			@ -383,7 +383,7 @@ def postMessageToOutbox(session, translate: {},
 | 
			
		|||
        # save all instance blogs to the news actor
 | 
			
		||||
        if postToNickname != 'news' and outboxName == 'tlblogs':
 | 
			
		||||
            if '/' in savedFilename:
 | 
			
		||||
                if isFeaturedWriter(base_dir, postToNickname, domain):
 | 
			
		||||
                if is_featured_writer(base_dir, postToNickname, domain):
 | 
			
		||||
                    savedPostId = savedFilename.split('/')[-1]
 | 
			
		||||
                    blogsDir = \
 | 
			
		||||
                        base_dir + '/accounts/news@' + domain + '/tlblogs'
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										2
									
								
								utils.py
								
								
								
								
							
							
						
						
									
										2
									
								
								utils.py
								
								
								
								
							| 
						 | 
				
			
			@ -122,7 +122,7 @@ def acct_dir(base_dir: str, nickname: str, domain: str) -> str:
 | 
			
		|||
    return base_dir + '/accounts/' + nickname + '@' + domain
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def isFeaturedWriter(base_dir: str, nickname: str, domain: str) -> bool:
 | 
			
		||||
def is_featured_writer(base_dir: str, nickname: str, domain: str) -> bool:
 | 
			
		||||
    """Is the given account a featured writer, appearing in the features
 | 
			
		||||
    timeline on news instances?
 | 
			
		||||
    """
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,7 +18,7 @@ from utils import isDormant
 | 
			
		|||
from utils import removeHtml
 | 
			
		||||
from utils import getDomainFromActor
 | 
			
		||||
from utils import getNicknameFromActor
 | 
			
		||||
from utils import isFeaturedWriter
 | 
			
		||||
from utils import is_featured_writer
 | 
			
		||||
from utils import acct_dir
 | 
			
		||||
from blocking import isBlocked
 | 
			
		||||
from follow import isFollowerOfPerson
 | 
			
		||||
| 
						 | 
				
			
			@ -342,8 +342,8 @@ def htmlPersonOptions(defaultTimeline: str,
 | 
			
		|||
                        '\n    <button type="submit" class="buttonsmall" ' + \
 | 
			
		||||
                        'name="submitPostToFeatures">' + \
 | 
			
		||||
                        translate['Submit'] + '</button><br>\n'
 | 
			
		||||
                    if not isFeaturedWriter(base_dir, optionsNickname,
 | 
			
		||||
                                            optionsDomain):
 | 
			
		||||
                    if not is_featured_writer(base_dir, optionsNickname,
 | 
			
		||||
                                              optionsDomain):
 | 
			
		||||
                        checkboxStr = checkboxStr.replace(' checked>', '>')
 | 
			
		||||
                    optionsStr += checkboxStr
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue