Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Hiro
GetTor
Commits
74fbbc77
Commit
74fbbc77
authored
Oct 15, 2019
by
Hiro
🏄
Browse files
Fix typo in db query
parent
9dd04d0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
gettor/services/twitter/twitterdm.py
View file @
74fbbc77
...
...
@@ -79,7 +79,10 @@ class Twitterdm(object):
:return: deferred whose callback/errback will handle the API execution
details.
"""
return
send_tweet
()
def
send_tweet
(
self
):
post_data
=
self
.
twitter
.
post_message
(
twitter_id
,
message
)
...
...
@@ -88,6 +91,8 @@ class Twitterdm(object):
else
:
self
.
twitter_errback
return
post_data
@
defer
.
inlineCallbacks
def
get_new
(
self
):
"""
...
...
@@ -114,7 +119,7 @@ class Twitterdm(object):
)
link_requests
=
yield
self
.
conn
.
get_requests
(
status
=
"ONHOLD"
,
command
=
"links"
,
service
=
"twtter"
status
=
"ONHOLD"
,
command
=
"links"
,
service
=
"tw
i
tter"
)
if
help_requests
:
...
...
@@ -123,7 +128,7 @@ class Twitterdm(object):
log
.
info
(
"Got new help request."
)
for
request
in
help_requests
:
ids
=
json
.
loads
(
"{}"
.
format
(
request
[
0
]
.
replace
(
"'"
,
'"'
)
))
ids
=
json
.
loads
(
"{}"
.
format
(
request
[
0
]))
message_id
=
ids
[
'id'
]
twitter_id
=
ids
[
'twitter_handle'
]
date
=
request
[
5
]
...
...
@@ -158,7 +163,7 @@ class Twitterdm(object):
log
.
info
(
"Got new links request."
)
for
request
in
link_requests
:
ids
=
json
.
loads
(
"{}"
.
format
(
request
[
0
]
.
replace
(
"'"
,
'"'
)
))
ids
=
json
.
loads
(
"{}"
.
format
(
request
[
0
]))
message_id
=
ids
[
'id'
]
twitter_id
=
ids
[
'twitter_handle'
]
date
=
request
[
5
]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment