forked from indymedia/epicyon
Prepare for groups
parent
517e44e24a
commit
1043a857aa
12
daemon.py
12
daemon.py
|
@ -2985,9 +2985,15 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
actorJson['type']='Service'
|
||||
actorChanged=True
|
||||
else:
|
||||
if actorJson['type']!='Person':
|
||||
actorJson['type']='Person'
|
||||
actorChanged=True
|
||||
if fields.get('isGroup'):
|
||||
if fields['isGroup']=='on':
|
||||
if actorJson['type']!='Group':
|
||||
actorJson['type']='Group'
|
||||
actorChanged=True
|
||||
else:
|
||||
if actorJson['type']!='Person':
|
||||
actorJson['type']='Person'
|
||||
actorChanged=True
|
||||
# save filtered words list
|
||||
filterFilename=self.server.baseDir+'/accounts/'+nickname+'@'+self.server.domain+'/filters.txt'
|
||||
if fields.get('filteredWords'):
|
||||
|
|
1
inbox.py
1
inbox.py
|
@ -728,6 +728,7 @@ def receiveUpdate(session,baseDir: str, \
|
|||
|
||||
if messageJson['object']['type']=='Person' or \
|
||||
messageJson['object']['type']=='Application' or \
|
||||
messageJson['object']['type']=='Group' or \
|
||||
messageJson['object']['type']=='Service':
|
||||
if messageJson['object'].get('url') and messageJson['object'].get('id'):
|
||||
print('Request to update actor: '+messageJson['actor'])
|
||||
|
|
2
posts.py
2
posts.py
|
@ -1399,6 +1399,7 @@ def sendToNamedAddresses(session,baseDir: str, \
|
|||
if postJsonObject['type']=='Update' and \
|
||||
(postJsonObject['object']['type']=='Person' or \
|
||||
postJsonObject['object']['type']=='Application' or \
|
||||
postJsonObject['object']['type']=='Group' or \
|
||||
postJsonObject['object']['type']=='Service'):
|
||||
# use the original object, which has a 'to'
|
||||
recipientsObject=postJsonObject
|
||||
|
@ -1567,6 +1568,7 @@ def sendToFollowers(session,baseDir: str, \
|
|||
if postJsonObject['object'].get('type'):
|
||||
if postJsonObject['object']['type']=='Person' or \
|
||||
postJsonObject['object']['type']=='Application' or \
|
||||
postJsonObject['object']['type']=='Group' or \
|
||||
postJsonObject['object']['type']=='Service':
|
||||
print('Sending profile update to shared inbox of '+toDomain)
|
||||
toNickname='inbox'
|
||||
|
|
|
@ -139,5 +139,6 @@
|
|||
"Page up": "Tudalen i fyny",
|
||||
"Vote": "Bleidleisio",
|
||||
"Replies": "Atebion",
|
||||
"Media": "Media"
|
||||
"Media": "Media",
|
||||
"This is a group account": "This is a group account"
|
||||
}
|
||||
|
|
|
@ -139,5 +139,6 @@
|
|||
"Page up": "Bild auf",
|
||||
"Vote": "Abstimmung",
|
||||
"Replies": "Antworten",
|
||||
"Media": "Media"
|
||||
"Media": "Media",
|
||||
"This is a group account": "This is a group account"
|
||||
}
|
||||
|
|
|
@ -139,5 +139,6 @@
|
|||
"Page up": "Page up",
|
||||
"Vote": "Vote",
|
||||
"Replies": "Replies",
|
||||
"Media": "Media"
|
||||
"Media": "Media",
|
||||
"This is a group account": "This is a group account"
|
||||
}
|
||||
|
|
|
@ -139,5 +139,6 @@
|
|||
"Page up": "Página arriba",
|
||||
"Vote": "Votar",
|
||||
"Replies": "Resp",
|
||||
"Media": "Media"
|
||||
"Media": "Media",
|
||||
"This is a group account": "This is a group account"
|
||||
}
|
||||
|
|
|
@ -139,5 +139,6 @@
|
|||
"Page up": "Haut de page",
|
||||
"Vote": "Vote",
|
||||
"Replies": "Réponses",
|
||||
"Media": "Media"
|
||||
"Media": "Media",
|
||||
"This is a group account": "This is a group account"
|
||||
}
|
||||
|
|
|
@ -139,5 +139,6 @@
|
|||
"Page up": "Leathanach suas",
|
||||
"Vote": "Vóta",
|
||||
"Replies": "Freagraí",
|
||||
"Media": "Media"
|
||||
"Media": "Media",
|
||||
"This is a group account": "This is a group account"
|
||||
}
|
||||
|
|
|
@ -139,5 +139,6 @@
|
|||
"Page up": "Pagina su",
|
||||
"Vote": "Voto",
|
||||
"Replies": "Risposte",
|
||||
"Media": "Media"
|
||||
"Media": "Media",
|
||||
"This is a group account": "This is a group account"
|
||||
}
|
||||
|
|
|
@ -536,6 +536,7 @@ def htmlEditProfile(translate: {},baseDir: str,path: str,domain: str,port: int)
|
|||
return ''
|
||||
|
||||
isBot=''
|
||||
isGroup=''
|
||||
displayNickname=nickname
|
||||
bioStr=''
|
||||
manuallyApprovesFollowers=''
|
||||
|
@ -559,6 +560,10 @@ def htmlEditProfile(translate: {},baseDir: str,path: str,domain: str,port: int)
|
|||
if actorJson.get('type'):
|
||||
if actorJson['type']=='Service':
|
||||
isBot='checked'
|
||||
isGroup=''
|
||||
elif actorJson['type']=='Group':
|
||||
isGroup='checked'
|
||||
isBot=''
|
||||
|
||||
filterStr=''
|
||||
filterFilename=baseDir+'/accounts/'+nickname+'@'+domain+'/filters.txt'
|
||||
|
@ -639,6 +644,7 @@ def htmlEditProfile(translate: {},baseDir: str,path: str,domain: str,port: int)
|
|||
' <div class="container">' \
|
||||
' <input type="checkbox" class=profilecheckbox" name="approveFollowers" '+manuallyApprovesFollowers+'>'+translate['Approve follower requests']+'<br>' \
|
||||
' <input type="checkbox" class=profilecheckbox" name="isBot" '+isBot+'>'+translate['This is a bot account']+'<br>' \
|
||||
' <input type="checkbox" class=profilecheckbox" name="isGroup" '+isGroup+'>'+translate['This is a group account']+'<br>' \
|
||||
' <br><b>'+translate['Filtered words']+'</b>' \
|
||||
' <br>'+translate['One per line']+ \
|
||||
' <textarea id="message" name="filteredWords" placeholder="" style="height:200px">'+filterStr+'</textarea>' \
|
||||
|
|
Loading…
Reference in New Issue