From ab4644e9eeee097207dc2689f4e01c08476a231c Mon Sep 17 00:00:00 2001 From: Simon Laux Date: Sat, 11 Oct 2025 17:49:41 +0200 Subject: [PATCH] adopt to chat type string union --- deltachat/const.go | 18 +++++++++++------- deltachat/types.go | 2 +- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/deltachat/const.go b/deltachat/const.go index 7da9ab4..becf6f4 100644 --- a/deltachat/const.go +++ b/deltachat/const.go @@ -31,13 +31,6 @@ const ( ContactFlagVerifiedOnly ContactFlag = 0x01 ContactFlagAddSelf ContactFlag = 0x02 - //Chat types - ChatUndefined ChatType = 0 - ChatSingle ChatType = 100 - ChatGroup ChatType = 120 - ChatMailinglist ChatType = 140 - ChatBroadcast ChatType = 160 - // Chat visibility types ChatVisibilityNormal ChatVisibility = "Normal" ChatVisibilityArchived ChatVisibility = "Archived" @@ -92,3 +85,14 @@ const ( SysmsgMultiDeviceSync SysmsgType = "MultiDeviceSync" SysmsgWebxdcInfoMessage SysmsgType = "WebxdcInfoMessage" ) + +const ( + ChatSingle ChatType = "Single" + ChatGroup ChatType = "Group" + ChatMailinglist ChatType = "Mailinglist" + ChatOutBroadcast ChatType = "OutBroadcast" + ChatInBroadcast ChatType = "InBroadcast" + + // Deprecated: use "ChatOutBroadcast" instead + ChatBroadcast ChatType = ChatOutBroadcast +) diff --git a/deltachat/types.go b/deltachat/types.go index 8f1e261..0247b25 100644 --- a/deltachat/types.go +++ b/deltachat/types.go @@ -13,7 +13,7 @@ type MsgId uint64 type ChatId uint64 // Values in const.go -type ChatType uint +type ChatType string type Account struct { // Configured