Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"main": "index.js",
"name": "libsession_util_nodejs",
"description": "Wrappers for the Session Util Library",
"version": "0.5.3",
"version": "0.5.4",
"license": "GPL-3.0",
"author": {
"name": "Oxen Project",
Expand Down
6 changes: 6 additions & 0 deletions src/groups/meta_group_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,7 @@ Napi::Value MetaGroupWrapper::infoGet(const Napi::CallbackInfo& info) {

obj["isDestroyed"] = toJs(env, this->meta_group->info->is_destroyed());
obj["profilePicture"] = toJs(env, this->meta_group->info->get_profile_pic());
obj["description"] = toJs(env, this->meta_group->info->get_description().value_or(""));

return obj;
});
Expand Down Expand Up @@ -427,6 +428,11 @@ Napi::Value MetaGroupWrapper::infoSet(const Napi::CallbackInfo& info) {
this->meta_group->info->set_profile_pic(profilePic);
}

if (auto description = maybeNonemptyString(
obj.Get("description"), "MetaGroupWrapper::setInfo description")) {
this->meta_group->info->set_description_truncated(*description);
}

return this->infoGet(info);
});
}
Expand Down
4 changes: 4 additions & 0 deletions types/shared.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ declare module 'libsession_util_nodejs' {
deleteBeforeSeconds: number | null;
expirySeconds: number | null;
profilePicture: ProfilePicture | null;
/**
* The group description. Defaults to "" if unset
*/
description: string;
};

export type GroupInfoGet = GroupInfoShared & {
Expand Down