Return proto wrapper instead of proto class
This commit is contained in:
parent
5cbc4b90fb
commit
e25f3c0b44
|
@ -1,12 +1,13 @@
|
|||
import { Reader } from "protobufjs";
|
||||
|
||||
import { ChatIdentity } from "../proto/communities/v1/chat_identity";
|
||||
import * as proto from "../proto/communities/v1/communities";
|
||||
import {
|
||||
CommunityMember,
|
||||
CommunityPermissions,
|
||||
} from "../proto/communities/v1/communities";
|
||||
|
||||
import { ChatIdentity } from "./chat_identity";
|
||||
|
||||
export class CommunityChat {
|
||||
public constructor(public proto: proto.CommunityChat) {}
|
||||
|
||||
|
@ -41,7 +42,9 @@ export class CommunityChat {
|
|||
}
|
||||
|
||||
public get identity(): ChatIdentity | undefined {
|
||||
return this.proto.identity;
|
||||
if (!this.proto.identity) return;
|
||||
|
||||
return new ChatIdentity(this.proto.identity);
|
||||
}
|
||||
|
||||
// TODO: Document this
|
||||
|
|
Loading…
Reference in New Issue