mirror of https://gitlab.com/bashrc2/epicyon
Refresh timeline after mute
parent
4ad6eaa016
commit
032ebe2a8c
|
@ -418,7 +418,7 @@ def sendBookmarkViaServer(baseDir: str, session,
|
|||
'Authorization': authHeader
|
||||
}
|
||||
postResult = postJson(session, newBookmarkJson, [], inboxUrl,
|
||||
headers, 30, True)
|
||||
headers, 3, True)
|
||||
if not postResult:
|
||||
if debug:
|
||||
print('WARN: POST bookmark failed for c2s to ' + inboxUrl)
|
||||
|
@ -502,7 +502,7 @@ def sendUndoBookmarkViaServer(baseDir: str, session,
|
|||
'Authorization': authHeader
|
||||
}
|
||||
postResult = postJson(session, newBookmarkJson, [], inboxUrl,
|
||||
headers, 30, True)
|
||||
headers, 3, True)
|
||||
if not postResult:
|
||||
if debug:
|
||||
print('WARN: POST unbookmark failed for c2s to ' + inboxUrl)
|
||||
|
|
|
@ -1241,6 +1241,17 @@ def runDesktopClient(baseDir: str, proxyType: str, httpPrefix: str,
|
|||
httpPrefix, postJsonObject['id'],
|
||||
cachedWebfingers, personCache,
|
||||
False, __version__)
|
||||
|
||||
boxJson = c2sBoxJson(baseDir, session,
|
||||
nickname, password,
|
||||
domain, port, httpPrefix,
|
||||
currTimeline, pageNumber,
|
||||
debug)
|
||||
if boxJson:
|
||||
_desktopShowBox(currTimeline, boxJson,
|
||||
screenreader, systemLanguage,
|
||||
espeak, pageNumber,
|
||||
newRepliesExist, newDMsExist)
|
||||
print('')
|
||||
elif (commandStr == 'mute' or
|
||||
commandStr == 'ignore' or
|
||||
|
@ -1269,6 +1280,16 @@ def runDesktopClient(baseDir: str, proxyType: str, httpPrefix: str,
|
|||
httpPrefix, postJsonObject['id'],
|
||||
cachedWebfingers, personCache,
|
||||
False, __version__)
|
||||
boxJson = c2sBoxJson(baseDir, session,
|
||||
nickname, password,
|
||||
domain, port, httpPrefix,
|
||||
currTimeline, pageNumber,
|
||||
debug)
|
||||
if boxJson:
|
||||
_desktopShowBox(currTimeline, boxJson,
|
||||
screenreader, systemLanguage,
|
||||
espeak, pageNumber,
|
||||
newRepliesExist, newDMsExist)
|
||||
print('')
|
||||
elif (commandStr == 'undo bookmark' or
|
||||
commandStr == 'remove bookmark' or
|
||||
|
|
8
posts.py
8
posts.py
|
@ -4199,8 +4199,8 @@ def sendMuteViaServer(baseDir: str, session,
|
|||
'Authorization': authHeader
|
||||
}
|
||||
postResult = postJson(session, newMuteJson, [], inboxUrl,
|
||||
headers, 30, True)
|
||||
if not postResult:
|
||||
headers, 3, True)
|
||||
if postResult is None:
|
||||
print('WARN: mute unable to post')
|
||||
|
||||
if debug:
|
||||
|
@ -4280,8 +4280,8 @@ def sendUndoMuteViaServer(baseDir: str, session,
|
|||
'Authorization': authHeader
|
||||
}
|
||||
postResult = postJson(session, undoMuteJson, [], inboxUrl,
|
||||
headers, 30, True)
|
||||
if not postResult:
|
||||
headers, 3, True)
|
||||
if postResult is None:
|
||||
print('WARN: undo mute unable to post')
|
||||
|
||||
if debug:
|
||||
|
|
|
@ -152,6 +152,12 @@ def postJson(session, postJsonObject: {}, federationList: [],
|
|||
session.post(url=inboxUrl,
|
||||
data=json.dumps(postJsonObject),
|
||||
headers=headers, timeout=timeoutSec)
|
||||
except requests.Timeout as e:
|
||||
if not quiet:
|
||||
print('ERROR: postJson timeout ' + inboxUrl + ' ' +
|
||||
json.dumps(postJsonObject) + ' ' + str(headers))
|
||||
print(e)
|
||||
return ''
|
||||
except requests.exceptions.RequestException as e:
|
||||
if not quiet:
|
||||
print('ERROR: postJson requests failed ' + inboxUrl + ' ' +
|
||||
|
|
Loading…
Reference in New Issue