update verssion
This commit is contained in:
parent
31a6bacb0b
commit
db2e2a33c5
|
|
@ -0,0 +1,10 @@
|
||||||
|
import dayjs from 'dayjs';
|
||||||
|
import utc from 'dayjs/plugin/utc';
|
||||||
|
import timezone from 'dayjs/plugin/timezone';
|
||||||
|
|
||||||
|
dayjs.extend(utc);
|
||||||
|
dayjs.extend(timezone);
|
||||||
|
|
||||||
|
export function formatTimeAU(timestamp: number) {
|
||||||
|
return dayjs(timestamp).tz('Australia/Sydney').format('DD/MM/YYYY, h:mm A');
|
||||||
|
}
|
||||||
|
|
@ -17,6 +17,7 @@ import { SendMessageDto } from './dtos/send-message.dto';
|
||||||
import { MessagesEventService } from './messages-event.service';
|
import { MessagesEventService } from './messages-event.service';
|
||||||
import { ZulipService } from './zulip.service';
|
import { ZulipService } from './zulip.service';
|
||||||
import { CreateBulkMessageDto } from './dtos/create-bulk-message.dto';
|
import { CreateBulkMessageDto } from './dtos/create-bulk-message.dto';
|
||||||
|
import { formatTimeAU } from '@/features/format-time-au';
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class MessagesService {
|
export class MessagesService {
|
||||||
constructor(
|
constructor(
|
||||||
|
|
@ -91,7 +92,7 @@ export class MessagesService {
|
||||||
|
|
||||||
if (!conversation) return;
|
if (!conversation) return;
|
||||||
|
|
||||||
const content = `** :rocket: ${result.name} sent:**
|
const content = `** :rocket: ${result.name} sent - ${formatTimeAU(result.time_raw)}:**
|
||||||
\`\`\`
|
\`\`\`
|
||||||
${result.message}
|
${result.message}
|
||||||
\`\`\``;
|
\`\`\``;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue