Show member list of seenby
This commit is contained in:
parent
37c254f8e1
commit
5962c8aedc
9 changed files with 141 additions and 43 deletions
|
|
@ -67,7 +67,7 @@ class Util {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
getAttachment(matrixClient, event, progressCallback, asBlob = false, abortController = undefined) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const content = event.getContent();
|
||||
|
|
@ -317,7 +317,7 @@ class Util {
|
|||
// Find the exact match (= object equality)
|
||||
return e.error === err
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
matrixClient.resendEvent(event, matrixClient.getRoom(event.getRoomId()))
|
||||
.then((result) => {
|
||||
|
|
@ -353,7 +353,7 @@ class Util {
|
|||
mimetype: file.type,
|
||||
size: file.size
|
||||
};
|
||||
|
||||
|
||||
// If audio, send duration in ms as well
|
||||
if (file.duration) {
|
||||
info.duration = file.duration;
|
||||
|
|
@ -463,11 +463,11 @@ class Util {
|
|||
|
||||
/**
|
||||
* Return 'true' if we should use voice mode for the given room.
|
||||
*
|
||||
*
|
||||
* The default value is given by the room itself. If the "type" of the
|
||||
* room is set to 'im.keanu.room_type_voice' then we default to voice mode,
|
||||
* else not. The user can then override this default by flipping the "voice mode"
|
||||
* swicth on room settings (it will be persisted as a user specific tag on the room)
|
||||
* swicth on room settings (it will be persisted as a user specific tag on the room)
|
||||
*/
|
||||
useVoiceMode(roomOrNull) {
|
||||
if (roomOrNull) {
|
||||
|
|
@ -478,7 +478,7 @@ class Util {
|
|||
if (tags && tags["ui_options"]) {
|
||||
return tags["ui_options"]["voice_mode"] === 1;
|
||||
}
|
||||
|
||||
|
||||
// Was the room created with a voice mode type?
|
||||
const createEvent = room.currentState.getStateEvents(
|
||||
"m.room.create",
|
||||
|
|
@ -779,6 +779,22 @@ class Util {
|
|||
return then.format('L');
|
||||
}
|
||||
|
||||
formatTime(time) {
|
||||
const date = new Date();
|
||||
date.setTime(time);
|
||||
|
||||
const today = new Date();
|
||||
if (
|
||||
date.getDate() == today.getDate() &&
|
||||
date.getMonth() == today.getMonth() &&
|
||||
date.getFullYear() == today.getFullYear()
|
||||
) {
|
||||
// For today, skip the date part
|
||||
return date.toLocaleTimeString();
|
||||
}
|
||||
return date.toLocaleString();
|
||||
}
|
||||
|
||||
formatRecordDuration(ms) {
|
||||
return dayjs.duration(ms).format("HH:mm:ss");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue