Add broadcast lists to chattypes

This commit is contained in:
flipsimon
2022-07-15 12:54:57 +02:00
parent 9926804f1b
commit d09a5adb03
5 changed files with 372 additions and 12 deletions

View File

@@ -83,7 +83,6 @@ module.exports = {
DC_MSG_GIF: 21,
DC_MSG_ID_DAYMARKER: 9,
DC_MSG_ID_LAST_SPECIAL: 9,
DC_MSG_ID_MARKER1: 1,
DC_MSG_IMAGE: 20,
DC_MSG_STICKER: 23,
DC_MSG_TEXT: 10,

View File

@@ -79,6 +79,10 @@ export class Chat {
return this.getType() === C.DC_CHAT_TYPE_GROUP
}
isBroadcast(): boolean {
return this.getType() === C.DC_CHAT_TYPE_BROADCAST
}
isMuted(): boolean {
return Boolean(binding.dcn_chat_is_muted(this.dc_chat))
}

View File

@@ -83,7 +83,6 @@ export enum C {
DC_MSG_GIF = 21,
DC_MSG_ID_DAYMARKER = 9,
DC_MSG_ID_LAST_SPECIAL = 9,
DC_MSG_ID_MARKER1 = 1,
DC_MSG_IMAGE = 20,
DC_MSG_STICKER = 23,
DC_MSG_TEXT = 10,

View File

@@ -5,6 +5,7 @@ export type ChatTypes =
| C.DC_CHAT_TYPE_MAILINGLIST
| C.DC_CHAT_TYPE_SINGLE
| C.DC_CHAT_TYPE_UNDEFINED
| C.DC_CHAT_TYPE_BROADCAST
export interface ChatJSON {
archived: boolean