mirror of
https://github.com/chatmail/core.git
synced 2026-05-05 22:36:30 +03:00
add getMailinglistAddr() to node (#3524)
* add getMailinglistAddr() to node * set mailinglistAddr in toJson
This commit is contained in:
@@ -39,6 +39,10 @@ export class Chat {
|
|||||||
return binding.dcn_chat_get_name(this.dc_chat)
|
return binding.dcn_chat_get_name(this.dc_chat)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getMailinglistAddr(): string {
|
||||||
|
return binding.dcn_chat_get_mailinglist_addr(this.dc_chat)
|
||||||
|
}
|
||||||
|
|
||||||
getProfileImage(): string {
|
getProfileImage(): string {
|
||||||
return binding.dcn_chat_get_profile_image(this.dc_chat)
|
return binding.dcn_chat_get_profile_image(this.dc_chat)
|
||||||
}
|
}
|
||||||
@@ -92,6 +96,7 @@ export class Chat {
|
|||||||
color: this.color,
|
color: this.color,
|
||||||
id: this.getId(),
|
id: this.getId(),
|
||||||
name: this.getName(),
|
name: this.getName(),
|
||||||
|
mailinglistAddr: this.getMailinglistAddr(),
|
||||||
profileImage: this.getProfileImage(),
|
profileImage: this.getProfileImage(),
|
||||||
type: this.getType(),
|
type: this.getType(),
|
||||||
isSelfTalk: this.isSelfTalk(),
|
isSelfTalk: this.isSelfTalk(),
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ export interface ChatJSON {
|
|||||||
color: string
|
color: string
|
||||||
id: number
|
id: number
|
||||||
name: string
|
name: string
|
||||||
|
mailinglistAddr: string
|
||||||
profileImage: string
|
profileImage: string
|
||||||
type: number
|
type: number
|
||||||
isSelfTalk: boolean
|
isSelfTalk: boolean
|
||||||
|
|||||||
@@ -1625,6 +1625,18 @@ NAPI_METHOD(dcn_chat_get_name) {
|
|||||||
NAPI_RETURN_AND_UNREF_STRING(name);
|
NAPI_RETURN_AND_UNREF_STRING(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NAPI_METHOD(dcn_chat_get_mailinglist_addr) {
|
||||||
|
NAPI_ARGV(1);
|
||||||
|
NAPI_DC_CHAT();
|
||||||
|
|
||||||
|
//TRACE("calling..");
|
||||||
|
char* addr = dc_chat_get_mailinglist_addr(dc_chat);
|
||||||
|
//TRACE("result %s", name);
|
||||||
|
|
||||||
|
NAPI_RETURN_AND_UNREF_STRING(addr);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
NAPI_METHOD(dcn_chat_get_profile_image) {
|
NAPI_METHOD(dcn_chat_get_profile_image) {
|
||||||
NAPI_ARGV(1);
|
NAPI_ARGV(1);
|
||||||
NAPI_DC_CHAT();
|
NAPI_DC_CHAT();
|
||||||
@@ -3370,6 +3382,7 @@ NAPI_INIT() {
|
|||||||
NAPI_EXPORT_FUNCTION(dcn_chat_get_visibility);
|
NAPI_EXPORT_FUNCTION(dcn_chat_get_visibility);
|
||||||
NAPI_EXPORT_FUNCTION(dcn_chat_get_id);
|
NAPI_EXPORT_FUNCTION(dcn_chat_get_id);
|
||||||
NAPI_EXPORT_FUNCTION(dcn_chat_get_name);
|
NAPI_EXPORT_FUNCTION(dcn_chat_get_name);
|
||||||
|
NAPI_EXPORT_FUNCTION(dcn_chat_get_mailinglist_addr);
|
||||||
NAPI_EXPORT_FUNCTION(dcn_chat_get_profile_image);
|
NAPI_EXPORT_FUNCTION(dcn_chat_get_profile_image);
|
||||||
NAPI_EXPORT_FUNCTION(dcn_chat_get_type);
|
NAPI_EXPORT_FUNCTION(dcn_chat_get_type);
|
||||||
NAPI_EXPORT_FUNCTION(dcn_chat_is_self_talk);
|
NAPI_EXPORT_FUNCTION(dcn_chat_is_self_talk);
|
||||||
|
|||||||
Reference in New Issue
Block a user