checkpoint

This commit is contained in:
Christien Rioux 2024-06-20 19:04:39 -04:00
parent 3f8b4d2a41
commit 17211f3515
22 changed files with 701 additions and 353 deletions

View file

@ -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');
}
}
}