mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Merge branch 'master' into mark-messages-as-read
This commit is contained in:
commit
ec9d488b3c
@ -284,6 +284,12 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
async sendMessage(message) {
|
async sendMessage(message) {
|
||||||
|
// check for usersTag and change userid to username
|
||||||
|
message.usersTag.forEach((userTag) => {
|
||||||
|
const needle = `<usertag>${userTag.id}</usertag>`
|
||||||
|
const replacement = `<usertag>@${userTag.name.replaceAll(' ', '-').toLowerCase()}</usertag>`
|
||||||
|
message.content = message.content.replaceAll(needle, replacement)
|
||||||
|
})
|
||||||
try {
|
try {
|
||||||
await this.$apollo.mutate({
|
await this.$apollo.mutate({
|
||||||
mutation: createMessageMutation(),
|
mutation: createMessageMutation(),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user