mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-05-12 11:12:19 -04:00
checkpoint
This commit is contained in:
parent
3f8b4d2a41
commit
17211f3515
22 changed files with 701 additions and 353 deletions
|
@ -34,3 +34,16 @@ extension ContactExt on proto.Contact {
|
|||
String get displayName =>
|
||||
nickname.isNotEmpty ? '$nickname (${profile.name})' : profile.name;
|
||||
}
|
||||
|
||||
extension ChatExt on proto.Chat {
|
||||
TypedKey get localConversationRecordKey {
|
||||
switch (whichKind()) {
|
||||
case proto.Chat_Kind.direct:
|
||||
return direct.localConversationRecordKey.toVeilid();
|
||||
case proto.Chat_Kind.group:
|
||||
return group.localConversationRecordKey.toVeilid();
|
||||
case proto.Chat_Kind.notSet:
|
||||
throw StateError('unknown chat kind');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue