forked from MirrorHub/mautrix-whatsapp
Add option to request more history from phone on login
This commit is contained in:
parent
84f6337979
commit
d94cd6a669
3 changed files with 5 additions and 0 deletions
|
@ -44,6 +44,7 @@ type BridgeConfig struct {
|
|||
MaxAge int64 `yaml:"max_age"`
|
||||
Backfill bool `yaml:"backfill"`
|
||||
DoublePuppetBackfill bool `yaml:"double_puppet_backfill"`
|
||||
RequestFullSync bool `yaml:"request_full_sync"`
|
||||
} `yaml:"history_sync"`
|
||||
UserAvatarSync bool `yaml:"user_avatar_sync"`
|
||||
BridgeMatrixLeave bool `yaml:"bridge_matrix_leave"`
|
||||
|
|
|
@ -107,6 +107,9 @@ bridge:
|
|||
# Whether to use custom puppet for backfilling.
|
||||
# In order to use this, the custom puppets must be in the appservice's user ID namespace.
|
||||
double_puppet_backfill: false
|
||||
# Whether the client should request a full sync from the phone when logging in.
|
||||
# This bumps the size of history syncs from 3 months to 1 year.
|
||||
request_full_sync: false
|
||||
# Whether or not puppet avatars should be fetched from the server even if an avatar is already set.
|
||||
user_avatar_sync: true
|
||||
# Whether or not Matrix users leaving groups should be bridged to WhatsApp
|
||||
|
|
1
main.go
1
main.go
|
@ -291,6 +291,7 @@ func (bridge *Bridge) Init() {
|
|||
store.BaseClientPayload.UserAgent.OsVersion = proto.String(WAVersion)
|
||||
store.BaseClientPayload.UserAgent.OsBuildNumber = proto.String(WAVersion)
|
||||
store.CompanionProps.Os = proto.String(bridge.Config.WhatsApp.OSName)
|
||||
store.CompanionProps.RequireFullSync = proto.Bool(bridge.Config.Bridge.HistorySync.RequestFullSync)
|
||||
versionParts := strings.Split(WAVersion, ".")
|
||||
if len(versionParts) > 2 {
|
||||
primary, _ := strconv.Atoi(versionParts[0])
|
||||
|
|
Loading…
Reference in a new issue