mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-15 21:57:22 +01:00
Attach client to chat messages (#10845)
* Attach client to chat messages * Word * Design tweaks * Fix potential error
This commit is contained in:
@@ -177,7 +177,11 @@ api.postChat = {
|
||||
}
|
||||
|
||||
const message = await highlightMentions(req.body.message);
|
||||
const newChatMessage = group.sendChat(message, user);
|
||||
let client = req.headers['x-client'] || '3rd Party';
|
||||
if (client) {
|
||||
client = client.replace('habitica-', '');
|
||||
}
|
||||
const newChatMessage = group.sendChat(message, user, null, client);
|
||||
let toSave = [newChatMessage.save()];
|
||||
|
||||
if (group.type === 'party') {
|
||||
|
||||
Reference in New Issue
Block a user