You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to get purple-gowhatsapp running with Spectrum2. Linking purple-gowhatsapp with WhatsApp Web and subsequent sending and receiving of messages is working. However after completing the linking to WhatsApp Web and having Spectrum2 restart, the linking with WhatsApp Web is lost. This appears to happen because Spectrum2 recreates the accounts.xml on transport restart and purple-gowhatsapp persists the WhatsApp Web session in said file.
Expected Behavior
WhatsApp Web linking (session) is preserved across reboots.
Current Behavior
WhatsApp Web linking (session) is lost during restart.
Possible Solution
Persist and restore purple-gowhatsapp specific session entries from accounts.xml in the database, similar to prpl-steam-mobile and prpl-eionrobb-discord.
Entry names as taken from purple-gowhatsappsource:
int: last-new-messages-timestamp
string: clientid
string: clientToken
string: serverToken
string: encKey
string: macKey
string: wid
Steps to Reproduce
Configure purple-gowhatsapp as transport in scpectrum.
Perform registration on transport
Restart Spectrum2
accounts.xml is recreated thus reasing purple-gowhatsapp specific entries.
Environment
System: Debian GNU/Linux 10 (buster)
APT repository: deb https://packages.spectrum.im/spectrum2/ buster main
Spectrum2 version: 2.0.13
Transport config:
[service]frontend=xmpp
allowed_servers=example.com
jid = whatsapp.example.com
password = <password>
server = 127.0.0.1
port = 5347
backend_host = 127.0.0.1
web_directory=/var/www/spectrum/whatsapp/
web_url=https://example.com/spectrum/whatsapp
users_per_backend=10
backend=/usr/bin/spectrum2_libpurple_backend
protocol=prpl-hehoe-gowhatsapp
[identity]name=Gateway to WhatsApp
type=whatsapp
category=gateway
[logging]config = /etc/spectrum2/logging.cfg
backend_config = /etc/spectrum2/backend-logging.cfg
[database]type = mysql
database = spectrum
server = 127.0.0.1
port = 3306
user = <user>
password = <password>
prefix = whatsapp_
[registration]enable_public_registration = 0
username_label= You can enter an arbitrary username. However, it is recommended to use your own internationalized number. (e.g. 49123456789):
[purple]# Use stored credentials for login.# Default: truerestore-session = true
# Fetch contact list from phone on connect.# Default: truepull-contacts = false
# Mark displayed messages as read.# Default: truemark-read = true
# Download user profile pictures (may cause GUI hiccups after connecting)# Default: falseget-icons = true
# Plain text login.# Default: false# Gajim sometimes has problems with inline images from this transport. May need to use plain text login and manually convert to a QR code image.plain-text-login = false
# Display all contacts as online.# Default: truefake-online = true
# Number of received messages to remember as already shown.# Default: 1000message-id-store-size = 1000
# Do not show messages older than previous session.# Default: falsemessage-timestamp-filter = true
# Treat system messages like normal messages (spectrum2 compatibility).# Default: falsesystem-messages-are-ordinary-messages = true
# Download files from media (image, audio, video, document) messages.# Default: falsedownload-attachments = true
# Try to download once only.# Default: truedownload-try-only-once = false
# Display images in conversation window after download# Default: trueinline-images = true
The text was updated successfully, but these errors were encountered:
Yes, that is a known issue, there is an ongoing PR to save/restore all settings from accounts.xml, but it was not complete yet.
Alternative solution - do not delete accounts.xml and keep all libpurple accounts there, need a lot of testing and this may have a lot of issues. Contributions are welcomed :)
I am trying to get purple-gowhatsapp running with Spectrum2. Linking
purple-gowhatsapp
with WhatsApp Web and subsequent sending and receiving of messages is working. However after completing the linking to WhatsApp Web and having Spectrum2 restart, the linking with WhatsApp Web is lost. This appears to happen because Spectrum2 recreates theaccounts.xml
on transport restart andpurple-gowhatsapp
persists the WhatsApp Web session in said file.Expected Behavior
WhatsApp Web linking (session) is preserved across reboots.
Current Behavior
WhatsApp Web linking (session) is lost during restart.
Possible Solution
Persist and restore
purple-gowhatsapp
specific session entries fromaccounts.xml
in the database, similar toprpl-steam-mobile
andprpl-eionrobb-discord
.Entry names as taken from
purple-gowhatsapp
source:last-new-messages-timestamp
clientid
clientToken
serverToken
encKey
macKey
wid
Steps to Reproduce
purple-gowhatsapp
as transport in scpectrum.accounts.xml
is recreated thus reasingpurple-gowhatsapp
specific entries.Environment
System:
Debian GNU/Linux 10 (buster)
APT repository:
deb https://packages.spectrum.im/spectrum2/ buster main
Spectrum2 version:
2.0.13
Transport config:
The text was updated successfully, but these errors were encountered: