mirror of
https://github.com/fleetbase/fleetbase.git
synced 2026-01-08 07:16:49 +00:00
chat functionality completed and ready for release
This commit is contained in:
@@ -13,11 +13,19 @@ export default class ChatChannelSerializer extends ApplicationSerializer.extend(
|
||||
get attrs() {
|
||||
return {
|
||||
participants: { embedded: 'always' },
|
||||
messages: { embedded: 'always' },
|
||||
last_message: { embedded: 'always' },
|
||||
};
|
||||
}
|
||||
|
||||
serialize(snapshot) {
|
||||
let json = {
|
||||
name: snapshot.attr('name'),
|
||||
meta: snapshot.attr('meta'),
|
||||
};
|
||||
|
||||
return json;
|
||||
}
|
||||
|
||||
normalize(typeClass, hash) {
|
||||
if (isArray(hash.feed)) {
|
||||
hash.feed = this.serializeFeed(hash.feed);
|
||||
|
||||
@@ -11,6 +11,7 @@ export default class ChatMessageSerializer extends ApplicationSerializer.extend(
|
||||
return {
|
||||
sender: { embedded: 'always' },
|
||||
attachments: { embedded: 'always' },
|
||||
receipts: { embedded: 'always' },
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user