Options
All
  • Public
  • Public/Protected
  • All
Menu
class
classdesc

Consists of interaction methods of the cached conversations of a user

Hierarchy

  • cacheChatsService

Index

Properties

Private subscriptions

subscriptions: Array<any> = []

Methods

cacheChatHistory

  • cacheChatHistory(group_id: any): void

cacheHistory

  • cacheHistory(data: any): void

getCachedData

  • getCachedData(group_id: any): any

getDatafromServer

  • getDatafromServer(group_id: any): void

getHistoryDatafromServer

  • getHistoryDatafromServer(data: any): void

pushCachedData

  • pushCachedData(group_id: any, data: any): void

setCachedData

  • setCachedData(group_id: any, data: any): void
  • Sets the messages from each group to its corresponding group chats into the cache

    Parameters

    • group_id: any
    • data: any

    Returns void

updateChatCache

  • updateChatCache(data: any): void
  • Updates the cached chat history data

    function

    updateChatCache

    Parameters

    • data: any

      Message Data to be updated when a new message is received

    Returns void

updateDelCacheData

  • updateDelCacheData(group_id: any, chat_id: any, user_id: any): void
  • Updates the cached data when a message is deleted

    Parameters

    • group_id: any

      ID of the group conversation

    • chat_id: any

      ID of the message to be deleted

    • user_id: any

      User_id of the requestor

    Returns void

updateFavCacheData

  • updateFavCacheData(markfav: any, group_id: any, chat_id: any, user_id: any): void
  • Updates cached data when a message is marked as favorite or unfavorite

    Parameters

    • markfav: any

      true when message is favorited, otherwise false

    • group_id: any

      ID of the group conversation

    • chat_id: any

      ID of the message to be marked or unmarked

    • user_id: any

      User_id of the requestor

    Returns void