mirror of https://gitlab.com/bashrc2/epicyon
				
				
				
			Terminology for joining and leaving groups
							parent
							
								
									ac77d4147f
								
							
						
					
					
						commit
						21bbe5f5a9
					
				
							
								
								
									
										11
									
								
								daemon.py
								
								
								
								
							
							
						
						
									
										11
									
								
								daemon.py
								
								
								
								
							| 
						 | 
				
			
			@ -2393,7 +2393,8 @@ class PubServer(BaseHTTPRequestHandler):
 | 
			
		|||
 | 
			
		||||
        # person options screen, follow button
 | 
			
		||||
        # See htmlPersonOptions followStr
 | 
			
		||||
        if '&submitFollow=' in optionsConfirmParams:
 | 
			
		||||
        if '&submitFollow=' in optionsConfirmParams or \
 | 
			
		||||
           '&submitJoin=' in optionsConfirmParams:
 | 
			
		||||
            if debug:
 | 
			
		||||
                print('Following ' + optionsActor)
 | 
			
		||||
            msg = \
 | 
			
		||||
| 
						 | 
				
			
			@ -2412,7 +2413,8 @@ class PubServer(BaseHTTPRequestHandler):
 | 
			
		|||
 | 
			
		||||
        # person options screen, unfollow button
 | 
			
		||||
        # See htmlPersonOptions followStr
 | 
			
		||||
        if '&submitUnfollow=' in optionsConfirmParams:
 | 
			
		||||
        if '&submitUnfollow=' in optionsConfirmParams or \
 | 
			
		||||
           '&submitLeave=' in optionsConfirmParams:
 | 
			
		||||
            print('Unfollowing ' + optionsActor)
 | 
			
		||||
            msg = \
 | 
			
		||||
                htmlConfirmUnfollow(self.server.cssCache,
 | 
			
		||||
| 
						 | 
				
			
			@ -6365,6 +6367,7 @@ class PubServer(BaseHTTPRequestHandler):
 | 
			
		|||
            optionsLink = None
 | 
			
		||||
            if len(optionsList) > 3:
 | 
			
		||||
                optionsLink = optionsList[3]
 | 
			
		||||
            isGroup = False
 | 
			
		||||
            donateUrl = None
 | 
			
		||||
            websiteUrl = None
 | 
			
		||||
            PGPpubKey = None
 | 
			
		||||
| 
						 | 
				
			
			@ -6390,6 +6393,8 @@ class PubServer(BaseHTTPRequestHandler):
 | 
			
		|||
                    movedTo = actorJson['movedTo']
 | 
			
		||||
                    if '"' in movedTo:
 | 
			
		||||
                        movedTo = movedTo.split('"')[1]
 | 
			
		||||
                if actorJson['type'] == 'Group':
 | 
			
		||||
                    isGroup = True
 | 
			
		||||
                lockedAccount = getLockedAccount(actorJson)
 | 
			
		||||
                donateUrl = getDonationUrl(actorJson)
 | 
			
		||||
                websiteUrl = getWebsite(actorJson, self.server.translate)
 | 
			
		||||
| 
						 | 
				
			
			@ -6445,7 +6450,7 @@ class PubServer(BaseHTTPRequestHandler):
 | 
			
		|||
                                    self.server.textModeBanner,
 | 
			
		||||
                                    self.server.newsInstance,
 | 
			
		||||
                                    authorized,
 | 
			
		||||
                                    accessKeys).encode('utf-8')
 | 
			
		||||
                                    accessKeys, isGroup).encode('utf-8')
 | 
			
		||||
            msglen = len(msg)
 | 
			
		||||
            self._set_headers('text/html', msglen,
 | 
			
		||||
                              cookie, callingDomain, False)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -485,5 +485,7 @@
 | 
			
		|||
    "Request to stay": "طلب البقاء",
 | 
			
		||||
    "Profile": "الملف الشخصي",
 | 
			
		||||
    "Introduce yourself and specify the date and time when you wish to stay": "عرّف عن نفسك وحدد التاريخ والوقت اللذين ترغب في الإقامة فيهما",
 | 
			
		||||
    "Members": "أعضاء"
 | 
			
		||||
    "Members": "أعضاء",
 | 
			
		||||
    "Join": "انضم",
 | 
			
		||||
    "Leave": "يترك"
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -485,5 +485,7 @@
 | 
			
		|||
    "Request to stay": "Sol·licitud de permanència",
 | 
			
		||||
    "Profile": "Perfil",
 | 
			
		||||
    "Introduce yourself and specify the date and time when you wish to stay": "Presenteu-vos i especifiqueu la data i l’hora en què voleu romandre",
 | 
			
		||||
    "Members": "Membres"
 | 
			
		||||
    "Members": "Membres",
 | 
			
		||||
    "Join": "Uneix-te",
 | 
			
		||||
    "Leave": "Marxa"
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -485,5 +485,7 @@
 | 
			
		|||
    "Request to stay": "Cais i aros",
 | 
			
		||||
    "Profile": "Proffil",
 | 
			
		||||
    "Introduce yourself and specify the date and time when you wish to stay": "Cyflwynwch eich hun a nodwch y dyddiad a'r amser pan fyddwch yn dymuno aros",
 | 
			
		||||
    "Members": "Aelodau"
 | 
			
		||||
    "Members": "Aelodau",
 | 
			
		||||
    "Join": "Ymunwch",
 | 
			
		||||
    "Leave": "Gadewch"
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -485,5 +485,7 @@
 | 
			
		|||
    "Request to stay": "Bitte um bleiben",
 | 
			
		||||
    "Profile": "Profil",
 | 
			
		||||
    "Introduce yourself and specify the date and time when you wish to stay": "Stellen Sie sich vor und geben Sie Datum und Uhrzeit Ihres Aufenthalts an",
 | 
			
		||||
    "Members": "Mitglieder"
 | 
			
		||||
    "Members": "Mitglieder",
 | 
			
		||||
    "Join": "Verbinden",
 | 
			
		||||
    "Leave": "Verlassen"
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -485,5 +485,7 @@
 | 
			
		|||
    "Request to stay": "Request to stay",
 | 
			
		||||
    "Profile": "Profile",
 | 
			
		||||
    "Introduce yourself and specify the date and time when you wish to stay": "Introduce yourself and specify the date and time when you wish to stay",
 | 
			
		||||
    "Members": "Members"
 | 
			
		||||
    "Members": "Members",
 | 
			
		||||
    "Join": "Join",
 | 
			
		||||
    "Leave": "Leave"
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -485,5 +485,7 @@
 | 
			
		|||
    "Request to stay": "Solicitud para quedarse",
 | 
			
		||||
    "Profile": "Perfil",
 | 
			
		||||
    "Introduce yourself and specify the date and time when you wish to stay": "Preséntese y especifique la fecha y hora en que desea quedarse",
 | 
			
		||||
    "Members": "Miembros"
 | 
			
		||||
    "Members": "Miembros",
 | 
			
		||||
    "Join": "Entrar",
 | 
			
		||||
    "Leave": "Dejar"
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -485,5 +485,7 @@
 | 
			
		|||
    "Request to stay": "Demande de séjour",
 | 
			
		||||
    "Profile": "Profil",
 | 
			
		||||
    "Introduce yourself and specify the date and time when you wish to stay": "Présentez-vous et précisez la date et l'heure auxquelles vous souhaitez rester",
 | 
			
		||||
    "Members": "Membres"
 | 
			
		||||
    "Members": "Membres",
 | 
			
		||||
    "Join": "Rejoindre",
 | 
			
		||||
    "Leave": "Laisser"
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -485,5 +485,7 @@
 | 
			
		|||
    "Request to stay": "Iarraidh fanacht",
 | 
			
		||||
    "Profile": "Próifíl",
 | 
			
		||||
    "Introduce yourself and specify the date and time when you wish to stay": "Cuir tú féin in aithne agus sonraigh an dáta agus an t-am ar mhaith leat fanacht",
 | 
			
		||||
    "Members": "Baill"
 | 
			
		||||
    "Members": "Baill",
 | 
			
		||||
    "Join": "Bí páirteach",
 | 
			
		||||
    "Leave": "Fág"
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -485,5 +485,7 @@
 | 
			
		|||
    "Request to stay": "रहने का अनुरोध",
 | 
			
		||||
    "Profile": "प्रोफ़ाइल",
 | 
			
		||||
    "Introduce yourself and specify the date and time when you wish to stay": "अपना परिचय दें और वह तारीख और समय निर्दिष्ट करें जब आप रुकना चाहते हैं",
 | 
			
		||||
    "Members": "सदस्यों"
 | 
			
		||||
    "Members": "सदस्यों",
 | 
			
		||||
    "Join": "शामिल हों",
 | 
			
		||||
    "Leave": "छोड़ना"
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -485,5 +485,7 @@
 | 
			
		|||
    "Request to stay": "Richiesta di soggiorno",
 | 
			
		||||
    "Profile": "Profilo",
 | 
			
		||||
    "Introduce yourself and specify the date and time when you wish to stay": "Presentati e specifica la data e l'ora in cui desideri soggiornare",
 | 
			
		||||
    "Members": "Membri"
 | 
			
		||||
    "Members": "Membri",
 | 
			
		||||
    "Join": "Aderire",
 | 
			
		||||
    "Leave": "Lasciare"
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -485,5 +485,7 @@
 | 
			
		|||
    "Request to stay": "滞在リクエスト",
 | 
			
		||||
    "Profile": "プロフィール",
 | 
			
		||||
    "Introduce yourself and specify the date and time when you wish to stay": "自己紹介をし、滞在したい日時を指定してください",
 | 
			
		||||
    "Members": "メンバー"
 | 
			
		||||
    "Members": "メンバー",
 | 
			
		||||
    "Join": "加入",
 | 
			
		||||
    "Leave": "離れる"
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -485,5 +485,7 @@
 | 
			
		|||
    "Request to stay": "Daxwaza mayînê bikin",
 | 
			
		||||
    "Profile": "Tengal",
 | 
			
		||||
    "Introduce yourself and specify the date and time when you wish to stay": "Xwe bidin nasîn û roj û dema ku hûn dixwazin bimînin bimînin diyar bikin",
 | 
			
		||||
    "Members": "Endam"
 | 
			
		||||
    "Members": "Endam",
 | 
			
		||||
    "Join": "Bihevgirêdan",
 | 
			
		||||
    "Leave": "Terikandin"
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -481,5 +481,7 @@
 | 
			
		|||
    "Request to stay": "Request to stay",
 | 
			
		||||
    "Profile": "Profile",
 | 
			
		||||
    "Introduce yourself and specify the date and time when you wish to stay": "Introduce yourself and specify the date and time when you wish to stay",
 | 
			
		||||
    "Members": "Members"
 | 
			
		||||
    "Members": "Members",
 | 
			
		||||
    "Join": "Join",
 | 
			
		||||
    "Leave": "Leave"
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -485,5 +485,7 @@
 | 
			
		|||
    "Request to stay": "Pedido para ficar",
 | 
			
		||||
    "Profile": "Perfil",
 | 
			
		||||
    "Introduce yourself and specify the date and time when you wish to stay": "Apresente-se e especifique a data e hora em que deseja ficar",
 | 
			
		||||
    "Members": "Membros"
 | 
			
		||||
    "Members": "Membros",
 | 
			
		||||
    "Join": "Juntar",
 | 
			
		||||
    "Leave": "Sair"
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -485,5 +485,7 @@
 | 
			
		|||
    "Request to stay": "Просьба остаться",
 | 
			
		||||
    "Profile": "Профиль",
 | 
			
		||||
    "Introduce yourself and specify the date and time when you wish to stay": "Представьтесь и укажите дату и время, когда вы хотите остаться",
 | 
			
		||||
    "Members": "Члены"
 | 
			
		||||
    "Members": "Члены",
 | 
			
		||||
    "Join": "Присоединиться",
 | 
			
		||||
    "Leave": "Оставлять"
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -485,5 +485,7 @@
 | 
			
		|||
    "Request to stay": "Omba kukaa",
 | 
			
		||||
    "Profile": "Profaili",
 | 
			
		||||
    "Introduce yourself and specify the date and time when you wish to stay": "Jitambulishe na taja tarehe na saa unapotaka kukaa",
 | 
			
		||||
    "Members": "Wanachama"
 | 
			
		||||
    "Members": "Wanachama",
 | 
			
		||||
    "Join": "Jiunge",
 | 
			
		||||
    "Leave": "Ondoka"
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -485,5 +485,7 @@
 | 
			
		|||
    "Request to stay": "要求留下",
 | 
			
		||||
    "Profile": "轮廓",
 | 
			
		||||
    "Introduce yourself and specify the date and time when you wish to stay": "自我介绍并指定您希望入住的日期和时间",
 | 
			
		||||
    "Members": "会员"
 | 
			
		||||
    "Members": "会员",
 | 
			
		||||
    "Join": "加入",
 | 
			
		||||
    "Leave": "离开"
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -60,7 +60,8 @@ def htmlPersonOptions(defaultTimeline: str,
 | 
			
		|||
                      textModeBanner: str,
 | 
			
		||||
                      newsInstance: bool,
 | 
			
		||||
                      authorized: bool,
 | 
			
		||||
                      accessKeys: {}) -> str:
 | 
			
		||||
                      accessKeys: {},
 | 
			
		||||
                      isGroup: bool) -> str:
 | 
			
		||||
    """Show options for a person: view/follow/block/report
 | 
			
		||||
    """
 | 
			
		||||
    optionsDomain, optionsPort = getDomainFromActor(optionsActor)
 | 
			
		||||
| 
						 | 
				
			
			@ -73,6 +74,8 @@ def htmlPersonOptions(defaultTimeline: str,
 | 
			
		|||
 | 
			
		||||
    dormant = False
 | 
			
		||||
    followStr = 'Follow'
 | 
			
		||||
    if isGroup:
 | 
			
		||||
        followStr = 'Join'
 | 
			
		||||
    blockStr = 'Block'
 | 
			
		||||
    nickname = None
 | 
			
		||||
    optionsNickname = None
 | 
			
		||||
| 
						 | 
				
			
			@ -86,6 +89,8 @@ def htmlPersonOptions(defaultTimeline: str,
 | 
			
		|||
        followerDomain, followerPort = getDomainFromActor(optionsActor)
 | 
			
		||||
        if isFollowingActor(baseDir, nickname, domain, optionsActor):
 | 
			
		||||
            followStr = 'Unfollow'
 | 
			
		||||
            if isGroup:
 | 
			
		||||
                followStr = 'Leave'
 | 
			
		||||
            dormant = \
 | 
			
		||||
                isDormant(baseDir, nickname, domain, optionsActor,
 | 
			
		||||
                          dormantMonths)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue