mirror of https://gitlab.com/bashrc2/epicyon
Unfollowing
parent
2028968776
commit
8ca64dd736
10
daemon.py
10
daemon.py
|
@ -87,6 +87,7 @@ from inbox import populateReplies
|
||||||
from inbox import getPersonPubKey
|
from inbox import getPersonPubKey
|
||||||
from follow import getFollowingFeed
|
from follow import getFollowingFeed
|
||||||
from follow import sendFollowRequest
|
from follow import sendFollowRequest
|
||||||
|
from follow import unfollowPerson
|
||||||
from auth import authorize
|
from auth import authorize
|
||||||
from auth import createPassword
|
from auth import createPassword
|
||||||
from auth import createBasicAuthHeader
|
from auth import createBasicAuthHeader
|
||||||
|
@ -1800,7 +1801,6 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
# person options screen, unfollow button
|
# person options screen, unfollow button
|
||||||
# See htmlPersonOptions
|
# See htmlPersonOptions
|
||||||
if '&submitUnfollow=' in optionsConfirmParams:
|
if '&submitUnfollow=' in optionsConfirmParams:
|
||||||
if debug:
|
|
||||||
print('Unfollowing ' + optionsActor)
|
print('Unfollowing ' + optionsActor)
|
||||||
msg = \
|
msg = \
|
||||||
htmlUnfollowConfirm(self.server.cssCache,
|
htmlUnfollowConfirm(self.server.cssCache,
|
||||||
|
@ -1959,6 +1959,11 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
followingNickname = getNicknameFromActor(followingActor)
|
followingNickname = getNicknameFromActor(followingActor)
|
||||||
followingDomain, followingPort = \
|
followingDomain, followingPort = \
|
||||||
getDomainFromActor(followingActor)
|
getDomainFromActor(followingActor)
|
||||||
|
followingDomainFull = followingDomain
|
||||||
|
if followingPort:
|
||||||
|
if followingPort != 80 and followingPort != 443:
|
||||||
|
followingDomainFull = \
|
||||||
|
followingDomain + ':' + str(followingPort)
|
||||||
if followerNickname == followingNickname and \
|
if followerNickname == followingNickname and \
|
||||||
followingDomain == domain and \
|
followingDomain == domain and \
|
||||||
followingPort == port:
|
followingPort == port:
|
||||||
|
@ -1987,6 +1992,9 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
}
|
}
|
||||||
pathUsersSection = path.split('/users/')[1]
|
pathUsersSection = path.split('/users/')[1]
|
||||||
self.postToNickname = pathUsersSection.split('/')[0]
|
self.postToNickname = pathUsersSection.split('/')[0]
|
||||||
|
unfollowPerson(self.server.baseDir, self.postToNickname,
|
||||||
|
self.server.domain,
|
||||||
|
followingNickname, followingDomainFull)
|
||||||
self._postToOutboxThread(unfollowJson)
|
self._postToOutboxThread(unfollowJson)
|
||||||
|
|
||||||
if callingDomain.endswith('.onion') and onionDomain:
|
if callingDomain.endswith('.onion') and onionDomain:
|
||||||
|
|
Loading…
Reference in New Issue