APISonar


co.chatsdk.core.dao.Keys.Date

> co > chatsdk > core > dao > Keys > Date
co APIs chatsdk APIs core APIs dao APIs Keys APIs Date APIs

Example 1
Map<String, Object> serialize() {
        Map<String, Object> values = new HashMap<String, Object>();

        values.put(Keys.JSON, model.getMetaValuesAsMap());
        values.put(Keys.Meta, model.getMetaValuesAsMap());
        values.put(Keys.Date, ServerValue.TIMESTAMP);
        values.put(Keys.Type, model.getType());
        values.put(Keys.UserFirebaseId, model.getSender().getEntityID());
        values.put(FirebasePaths.ReadPath, initialReadReceipts());
        values.put(Keys.To, getTo());
        values.put(Keys.From, ChatSDK.currentUserID());

        return values;
    }
Example 2
public HashMap<String, Object> lastMessageData () {
        HashMap<String, Object> map = new HashMap<>();
        map.put(Keys.Type, model.getType());
        map.put(Keys.Date, ServerValue.TIMESTAMP);
        map.put(Keys.UserFirebaseId, model.getSender().getEntityID());
        map.put(Keys.From, model.getSender().getEntityID());
        map.put(Keys.UserName, model.getSender().getName());
        map.put(Keys.JSON, model.getMetaValuesAsMap());
        map.put(Keys.Meta, model.getMetaValuesAsMap());
        return map;
    }