more idimatic VC formatting, better presentation of preview

This commit is contained in:
or-else
2022-05-30 19:51:58 -07:00
parent eef880c448
commit e287755f13
11 changed files with 124 additions and 58 deletions
+10 -7
View File
@@ -169,9 +169,11 @@ export function fullFormatter(style, data, values, key, stack) {
el = CallMessage;
// Video call messages do not have content.
values = null;
attr.callState = this.callState;
attr.incoming = this.isResponse;
attr.duration = this.callDuration;
if (data) {
attr.callState = data.state;
attr.incoming = data.incoming;
attr.duration = data.duration;
}
break;
default:
if (!el) {
@@ -257,10 +259,11 @@ export function previewFormatter(style, data, values, key) {
break;
case 'VC':
el = CallStatus;
attr.callState = this.callState;
attr.incoming = this.previewIsResponse;
attr.duration = this.callDuration;
attr.success = true; // FIXME: use actuall call completion status instead of TRUE.
if (data) {
attr.callState = data.state;
attr.incoming = data.incoming;
attr.duration = data.duration;
}
values = null;
break;
case 'QQ':