chat

How to know which offline data has been synced to firebase Realtime Database

扶醉桌前 提交于 2021-02-16 09:32:53
问题 I'm writing a chat application with the help of firebase.Here I have a problem , if the device is offline the data is stored in cache and when device is back online the cache will be synced , but how to know which data is synced and which not (User may have poor internet connection , so syncing may be delayed).How to notify user that message has been sent or sending , and that too we need to manage a huge list of messages Thank you! 回答1: There are two ways: Using a completion listener as

Node.js, socket-io based one to one chat engine working fine on LOCAL but not working when running on different laptops using ngrok

回眸只為那壹抹淺笑 提交于 2021-02-11 16:39:29
问题 I am working on a chat server and it's working fine on local but whenever I try to run the project using ngrok then me and my friend are unable to chat. var socket = io('http://localhost:7777', { query: { username: '<%= user %>' } }); Can anyone guide me how to make this public? Because the IP address changes everytime when connected to internet. and var app = express(); const chatServer = require('http').createServer(app); chatServer.listen(7777); I'm working in node.js for the first time

Count unseen messages in group chat with firestore

余生长醉 提交于 2021-02-08 03:31:31
问题 I want to track the number of unseen messages for each member of a group chat. I store chat metadata in a chats collection, and messages for each chat in messages/{chatId} . I have checked other threads that ask about this, but in this scenario there's a group chat so it's more complicated. The threads that I have read suppose that it's a chat between two people. I have thought about having a new collection seenMsgTimestamps where I store the timestamp of the last message that a certain user

Django chat with ajax polling

非 Y 不嫁゛ 提交于 2021-02-05 20:40:16
问题 I need to create a chat similar to facebook chat. I am thinking to create a simple application Chat and then using ajax polling ( to send request every 2-3 seconds ). Is this a good approach ? 回答1: I'd go with something that involves push/real-time messaging controlled by the server. You'll get proper real-time chat and it will scale a lot better. Take a look at http://www.orbited.org/ which is the way to go, I reckon. It's not core django, but it's Python and will sit well alongside a Django

Django chat with ajax polling

一世执手 提交于 2021-02-05 20:40:16
问题 I need to create a chat similar to facebook chat. I am thinking to create a simple application Chat and then using ajax polling ( to send request every 2-3 seconds ). Is this a good approach ? 回答1: I'd go with something that involves push/real-time messaging controlled by the server. You'll get proper real-time chat and it will scale a lot better. Take a look at http://www.orbited.org/ which is the way to go, I reckon. It's not core django, but it's Python and will sit well alongside a Django

Django chat with ajax polling

≡放荡痞女 提交于 2021-02-05 20:38:32
问题 I need to create a chat similar to facebook chat. I am thinking to create a simple application Chat and then using ajax polling ( to send request every 2-3 seconds ). Is this a good approach ? 回答1: I'd go with something that involves push/real-time messaging controlled by the server. You'll get proper real-time chat and it will scale a lot better. Take a look at http://www.orbited.org/ which is the way to go, I reckon. It's not core django, but it's Python and will sit well alongside a Django

Push notification preferences

a 夏天 提交于 2021-01-29 04:48:11
问题 We need to allow a user to set specific preferences for receiving push notifications. Examples: mute specific channel send push only when @mentioned (global and chat specificly) docs https://getstream.io/chat/docs/#push_ios doesn't cover it at all. Seems only turn on/off all notifications is possible? 回答1: At the moment this is not supported by Stream Chat, improvements to the Push capabilities are added regularly so extended support for mutes and mentions will also come up soon enough. In

How can I sort chat list by the most recent message?

流过昼夜 提交于 2020-12-15 05:27:11
问题 I don't know why I got stuck on a problem that the chatList is not sorting by the last message time or by the most recent message. I have tried by storing timestamp in the database and orderChildBy timestamp but it still not working. This is the way how I created chatList in the firebaseDatabase val timeAgo = Date().time val myTimeMap = HashMap<String, Any?>() myTimeMap["timestamp"] = timeAgo.toString() myTimeMap["id"] = friendId val friendTimeMap = HashMap<String, Any?>() friendTimeMap[