diff --git a/website/client/components/groups/chat.vue b/website/client/components/groups/chat.vue
new file mode 100644
index 0000000000..2ba54afb4e
--- /dev/null
+++ b/website/client/components/groups/chat.vue
@@ -0,0 +1,222 @@
+
+ .row.chat-row
+ .col-12
+ h3(v-once) {{ label }}
+
+ .row
+ textarea(:placeholder='placeholder',
+ v-model='newMessage',
+ :class='{"user-entry": newMessage}',
+ @keydown='updateCarretPosition',
+ @keyup.ctrl.enter='sendMessageShortcut()',
+ @paste='disableMessageSendShortcut()'
+ )
+ autocomplete(
+ :text='newMessage',
+ v-on:select="selectedAutocomplete",
+ :coords='coords',
+ :chat='group.chat')
+
+ .row.chat-actions
+ .col-6.chat-receive-actions
+ button.btn.btn-secondary.float-left.fetch(v-once, @click='fetchRecentMessages()') {{ $t('fetchRecentMessages') }}
+ button.btn.btn-secondary.float-left(v-once, @click='reverseChat()') {{ $t('reverseChat') }}
+ .col-6.chat-send-actions
+ button.btn.btn-secondary.send-chat.float-right(v-once, @click='sendMessage()') {{ $t('send') }}
+
+ community-guidelines
+
+ slot(
+ name="additionRow",
+ )
+
+ .row
+ .hr.col-12
+ chat-message(:chat.sync='group.chat', :group-id='group._id', :group-name='group.name')
+
+
+
+
+
diff --git a/website/client/components/groups/group.vue b/website/client/components/groups/group.vue
index 3f61a5033f..28436ff084 100644
--- a/website/client/components/groups/group.vue
+++ b/website/client/components/groups/group.vue
@@ -27,25 +27,16 @@
.svg-icon.gem(v-html="icons.gem")
span.number {{group.balance * 4}}
div(v-once) {{ $t('guildBank') }}
- .row.chat-row
- .col-12
- h3(v-once) {{ $t('chat') }}
- .row.new-message-row
- textarea(:placeholder="!isParty ? $t('chatPlaceholder') : $t('partyChatPlaceholder')", v-model='newMessage', @keydown='updateCarretPosition', @keyup.ctrl.enter='sendMessageShortcut()', @paste='disableMessageSendShortcut()')
- autocomplete(:text='newMessage', v-on:select="selectedAutocomplete", :coords='coords', :chat='group.chat')
- .row.chat-actions
- .col-6.chat-receive-actions
- button.btn.btn-secondary.float-left.fetch(v-once, @click='fetchRecentMessages()') {{ $t('fetchRecentMessages') }}
- button.btn.btn-secondary.float-left(v-once, @click='reverseChat()') {{ $t('reverseChat') }}
- .col-6.chat-send-actions
- button.btn.btn-secondary.send-chat.float-right(v-once, @click='sendMessage()') {{ $t('send') }}
- community-guidelines
+ chat(
+ :label="$t('chat')",
+ :group="group",
+ :placeholder="!isParty ? $t('chatPlaceholder') : $t('partyChatPlaceholder')",
+ @fetchRecentMessages="fetchRecentMessages()"
+ )
+ template(slot="additionRow")
.row(v-if='showNoNotificationsMessage')
.col-12.no-notifications
| {{$t('groupNoNotifications')}}
- .row
- .col-12.hr
- chat-message(:chat.sync='group.chat', :group-id='group._id', :group-name='group.name')
.col-12.col-sm-4.sidebar
.row(:class='{"guild-background": !isParty}')
.col-12
@@ -260,7 +251,6 @@
diff --git a/website/client/libs/staffList.js b/website/client/libs/staffList.js
new file mode 100644
index 0000000000..96eb262fc3
--- /dev/null
+++ b/website/client/libs/staffList.js
@@ -0,0 +1,97 @@
+export default [
+ {
+ name: 'beffymaroo',
+ type: 'Staff',
+ uuid: '9fe7183a-4b79-4c15-9629-a1aee3873390',
+ },
+ // {
+ // name: 'lefnire',
+ // type: 'Staff',
+ // uuid: '00000000-0000-4000-9000-000000000000',
+ // },
+ {
+ name: 'Lemoness',
+ type: 'Staff',
+ uuid: '7bde7864-ebc5-4ee2-a4b7-1070d464cdb0',
+ },
+ {
+ name: 'paglias',
+ type: 'Staff',
+ uuid: 'ed4c688c-6652-4a92-9d03-a5a79844174a',
+ },
+ {
+ name: 'redphoenix',
+ type: 'Staff',
+ uuid: 'cb46ad54-8c78-4dbc-a8ed-4e3185b2b3ff',
+ },
+ {
+ name: 'SabreCat',
+ type: 'Staff',
+ uuid: '7f14ed62-5408-4e1b-be83-ada62d504931',
+ },
+ {
+ name: 'TheHollidayInn',
+ type: 'Staff',
+ uuid: '206039c6-24e4-4b9f-8a31-61cbb9aa3f66',
+ },
+ {
+ name: 'viirus',
+ type: 'Staff',
+ uuid: 'a327d7e0-1c2e-41be-9193-7b30b484413f',
+ },
+ {
+ name: 'It\'s Bailey',
+ type: 'Moderator',
+ uuid: '9da65443-ed43-4c21-804f-d260c1361596',
+ },
+ {
+ name: 'Alys',
+ type: 'Moderator',
+ uuid: 'd904bd62-da08-416b-a816-ba797c9ee265',
+ },
+ {
+ name: 'Blade',
+ type: 'Moderator',
+ uuid: '75f270e8-c5db-4722-a5e6-a83f1b23f76b',
+ },
+ {
+ name: 'Breadstrings',
+ type: 'Moderator',
+ uuid: '3b675c0e-d7a6-440c-8687-bc67cd0bf4e9',
+ },
+ {
+ name: 'Cantras',
+ type: 'Moderator',
+ uuid: '28771972-ca6d-4c03-8261-e1734aa7d21d',
+ },
+ // {
+ // name: 'Daniel the Bard',
+ // type: 'Moderator',
+ // uuid: '1f7c4a74-03a3-4b2c-b015-112d0acbd593',
+ // },
+ {
+ name: 'deilann 5.0.5b',
+ type: 'Moderator',
+ uuid: 'e7b5d1e2-3b6e-4192-b867-8bafdb03eeec',
+ },
+ {
+ name: 'Dewines',
+ type: 'Moderator',
+ uuid: '262a7afb-6b57-4d81-88e0-80d2e9f6cbdc',
+ },
+ {
+ name: 'Fox_town',
+ type: 'Moderator',
+ uuid: 'a05f0152-d66b-4ef1-93ac-4adb195d0031',
+ },
+ {
+ name: 'Megan',
+ type: 'Moderator',
+ uuid: '73e5125c-2c87-4004-8ccd-972aeac4f17a',
+ },
+ {
+ name: 'shanaqui',
+ type: 'Moderator',
+ uuid: 'bb089388-28ae-4e42-a8fa-f0c2bfb6f779',
+ },
+];
diff --git a/website/server/models/group.js b/website/server/models/group.js
index 8d98a1b1e7..65b49aee45 100644
--- a/website/server/models/group.js
+++ b/website/server/models/group.js
@@ -346,7 +346,11 @@ schema.statics.toJSONCleanChat = async function groupToJSONCleanChat (group, use
// Convert to timestamps because Android expects it
toJSON.chat.forEach(chat => {
- chat.timestamp = chat.timestamp ? chat.timestamp.getTime() : new Date().getTime();
+ // old chats are saved with a numeric timestamp
+ // new chats use `Date` which then has to be converted to the numeric timestamp
+ if (chat.timestamp.getTime) {
+ chat.timestamp = chat.timestamp.getTime();
+ }
});
return toJSON;
@@ -1537,4 +1541,4 @@ if (!nconf.get('IS_TEST')) {
privacy: 'public',
}).save();
});
-}
\ No newline at end of file
+}