fix(api): correct timestamp usage (#67)
This commit is contained in:
parent
056d578965
commit
288477a5b3
@ -26,7 +26,7 @@ export class CallInfo {
|
|||||||
|
|
||||||
constructor(call: MessageCall) {
|
constructor(call: MessageCall) {
|
||||||
this.participantIds = call.participant_ids ?? new Set();
|
this.participantIds = call.participant_ids ?? new Set();
|
||||||
this.endedTimestamp = call.ended_timestamp ?? null;
|
this.endedTimestamp = call.ended_timestamp ? new Date(call.ended_timestamp) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
toMessageCall(): MessageCall {
|
toMessageCall(): MessageCall {
|
||||||
|
|||||||
@ -45,7 +45,7 @@ export class Embed {
|
|||||||
this.title = embed.title ?? null;
|
this.title = embed.title ?? null;
|
||||||
this.description = embed.description ?? null;
|
this.description = embed.description ?? null;
|
||||||
this.url = embed.url ?? null;
|
this.url = embed.url ?? null;
|
||||||
this.timestamp = embed.timestamp ?? null;
|
this.timestamp = embed.timestamp ? new Date(embed.timestamp) : null;
|
||||||
this.color = embed.color ?? null;
|
this.color = embed.color ?? null;
|
||||||
this.author = embed.author ? new EmbedAuthor(embed.author) : null;
|
this.author = embed.author ? new EmbedAuthor(embed.author) : null;
|
||||||
this.provider = embed.provider ? new EmbedProvider(embed.provider) : null;
|
this.provider = embed.provider ? new EmbedProvider(embed.provider) : null;
|
||||||
|
|||||||
@ -38,8 +38,8 @@ export class MessageSnapshot {
|
|||||||
|
|
||||||
constructor(snapshot: CassandraMessageSnapshot) {
|
constructor(snapshot: CassandraMessageSnapshot) {
|
||||||
this.content = snapshot.content ?? null;
|
this.content = snapshot.content ?? null;
|
||||||
this.timestamp = snapshot.timestamp;
|
this.timestamp = new Date(snapshot.timestamp);
|
||||||
this.editedTimestamp = snapshot.edited_timestamp ?? null;
|
this.editedTimestamp = snapshot.edited_timestamp ? new Date(snapshot.edited_timestamp) : null;
|
||||||
this.mentionedUserIds = snapshot.mention_users ?? new Set();
|
this.mentionedUserIds = snapshot.mention_users ?? new Set();
|
||||||
this.mentionedRoleIds = snapshot.mention_roles ?? new Set();
|
this.mentionedRoleIds = snapshot.mention_roles ?? new Set();
|
||||||
this.mentionedChannelIds = snapshot.mention_channels ?? new Set();
|
this.mentionedChannelIds = snapshot.mention_channels ?? new Set();
|
||||||
|
|||||||
@ -0,0 +1 @@
|
|||||||
|
ALTER TYPE fluxer.message_snapshot ADD edited_timestamp timestamp;
|
||||||
Loading…
x
Reference in New Issue
Block a user