mirror of https://gitlab.com/bashrc2/epicyon
Like a post
parent
1f366d27cf
commit
33077ab8df
|
@ -67,8 +67,8 @@ def announcePublic(baseDir: str,federationList: [],username: str, domain: str, p
|
|||
ccUrl = prefix + '://'+fromDomain+'/users/'+username+'/followers'
|
||||
return createAnnounce(baseDir,username, domain, port,toUrl, ccUrl, https, objectUrl, saveToFile)
|
||||
|
||||
def repeatMessage(baseDir: str,federationList: [],username: str, domain: str, port: int, https: bool, announceUsername: str, announceDomain: str, announcePort: int, announceStatusNumber: int, announceHttps: bool, saveToFile: bool) -> {}:
|
||||
"""Repeats a given status message
|
||||
def repeatPost(baseDir: str,federationList: [],username: str, domain: str, port: int, https: bool, announceUsername: str, announceDomain: str, announcePort: int, announceStatusNumber: int, announceHttps: bool, saveToFile: bool) -> {}:
|
||||
"""Repeats a given status post
|
||||
"""
|
||||
prefix='https'
|
||||
if not announceHttps:
|
||||
|
|
15
like.py
15
like.py
|
@ -42,3 +42,18 @@ def like(baseDir: str,federationList: [],username: str, domain: str, port: int,t
|
|||
domain=domain.split(':')[0]
|
||||
# TODO update likes collection
|
||||
return newLike
|
||||
|
||||
def likePost(baseDir: str,federationList: [],username: str, domain: str, port: int, https: bool, likeUsername: str, likeDomain: str, likePort: int, likeStatusNumber: int, likeHttps: bool,saveToFile: bool) -> {}:
|
||||
"""Likes a given status post
|
||||
"""
|
||||
prefix='https'
|
||||
if not likeHttps:
|
||||
prefix='http'
|
||||
|
||||
likeDomain=likeDomain
|
||||
if likePort!=80 and likePort!=443:
|
||||
likeDomain=likeDomain+':'+str(likePort)
|
||||
|
||||
objectUrl = prefix + '://'+likeDomain+'/users/'+likeUsername+'/statuses/'+str(likeStatusNumber)
|
||||
|
||||
return like(baseDir,federationList,username,domain,port,toUrl,ccUrl,https,objectUrl,saveToFile)
|
||||
|
|
Loading…
Reference in New Issue