mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2025-03-05 00:40:18 +01:00
Add option to disable backfill read receipt bridging
This commit is contained in:
parent
1bdbf0a22d
commit
62e806c8c3
2 changed files with 2 additions and 1 deletions
|
@ -74,6 +74,7 @@ type BridgeConfig struct {
|
||||||
ArchiveTag string `yaml:"archive_tag"`
|
ArchiveTag string `yaml:"archive_tag"`
|
||||||
PinnedTag string `yaml:"pinned_tag"`
|
PinnedTag string `yaml:"pinned_tag"`
|
||||||
TagOnlyOnCreate bool `yaml:"tag_only_on_create"`
|
TagOnlyOnCreate bool `yaml:"tag_only_on_create"`
|
||||||
|
MarkReadOnlyOnCreate bool `yaml:"mark_read_only_on_create"`
|
||||||
|
|
||||||
WhatsappThumbnail bool `yaml:"whatsapp_thumbnail"`
|
WhatsappThumbnail bool `yaml:"whatsapp_thumbnail"`
|
||||||
|
|
||||||
|
|
2
user.go
2
user.go
|
@ -749,7 +749,7 @@ func (user *User) syncChatDoublePuppetDetails(doublePuppet *Puppet, chat Chat, j
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
intent := doublePuppet.CustomIntent()
|
intent := doublePuppet.CustomIntent()
|
||||||
if chat.UnreadCount == 0 {
|
if chat.UnreadCount == 0 && (justCreated || !user.bridge.Config.Bridge.MarkReadOnlyOnCreate) {
|
||||||
lastMessage := user.bridge.DB.Message.GetLastInChat(chat.Portal.Key)
|
lastMessage := user.bridge.DB.Message.GetLastInChat(chat.Portal.Key)
|
||||||
if lastMessage != nil {
|
if lastMessage != nil {
|
||||||
err := intent.MarkRead(chat.Portal.MXID, lastMessage.MXID)
|
err := intent.MarkRead(chat.Portal.MXID, lastMessage.MXID)
|
||||||
|
|
Loading…
Add table
Reference in a new issue