Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Memri
plugins
whatsapp
Commits
45588d23
Commit
45588d23
authored
3 years ago
by
Koen van der Veen
Browse files
Options
Download
Email Patches
Plain Diff
fix profile pics
parent
0bdf8bcb
Pipeline
#4333
passed with stage
in 1 minute and 12 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
whatsapp/plugin.py
+3
-3
whatsapp/plugin.py
with
3 additions
and
3 deletions
+3
-3
whatsapp/plugin.py
+
3
-
3
View file @
45588d23
...
...
@@ -336,13 +336,13 @@ class WhatsappPlugin(PluginBase):
# ipdb.set_trace()
# related_account = self.client.search({'type': 'Account', 'externalId': id})[0]
related_chat
=
self
.
stripped_jid2
accoun
t
[
jid
.
split
(
"@"
)[
0
]]
related_chat
=
self
.
stripped_jid2
cha
t
[
jid
.
split
(
"@"
)[
0
]]
if
related_chat
:
photo_bytes
=
requests
.
get
(
data
[
"eurl"
]).
content
photo
=
Photo
.
from_bytes
(
photo_bytes
)
self
.
client
.
create_photo
(
photo
)
print
(
f
"Updating profile picture for
{
related_chat
.
displayN
ame
}
"
)
edge
=
Edge
(
related_chat
,
photo
,
"p
rofilePicture
"
)
print
(
f
"Updating profile picture for
{
related_chat
.
n
ame
}
"
)
edge
=
Edge
(
related_chat
,
photo
,
"p
hoto
"
)
self
.
client
.
create_edge
(
edge
)
else
:
print
(
f
"Did not import profile picture for
{
jid
}
, could not find chat"
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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
Menu
Explore
Projects
Groups
Snippets