Git Product home page Git Product logo

tinode / chat Goto Github PK

View Code? Open in Web Editor NEW
11.8K 300.0 1.8K 34.71 MB

Instant messaging platform. Backend in Go. Clients: Swift iOS, Java Android, JS webapp, scriptable command line; chatbots

License: GNU General Public License v3.0

Go 88.64% Shell 1.59% Python 8.67% Dockerfile 0.43% Erlang 0.09% Scala 0.57%
chat chat-application chatapp go golang instant-messaging messenger messaging messaging-api chatbots chatserver webchat-server whatsapp telegram xmpp video-call video-chat video-conferencing webrtc collaboration

chat's Introduction

Tinode Instant Messaging Server

Instant messaging full stack. Backend in pure Go (license GPL 3.0), clients for Android (Java), iOS (Swift), and web (ReactJS), as well as gRPC client support for C++, C#, Go, Java, Node, PHP, Python, Ruby, Objective-C, etc (all clients licensed under Apache 2.0). Wire transport is JSON over websocket (long polling is also available) or protobuf with gRPC.

This is beta-quality software: feature-complete and stable but probably with a few bugs or missing features. Follow instructions to install and run or use one of the cloud services below. Read API documentation.

Tinode is not XMPP/Jabber. It is not compatible with XMPP. It's meant as a replacement for XMPP. On the surface, it's a lot like open source WhatsApp or Telegram.

Why?

The promise of XMPP was to deliver federated instant messaging: anyone would be able to spin up an IM server capable of exchanging messages with any other XMPP server in the world. Unfortunately, XMPP never delivered on this promise. Instant messengers are still a bunch of incompatible walled gardens, similar to what AoL of the late 1990s was to the open Internet.

The goal of this project is to deliver on XMPP's original vision: create a modern open platform for federated instant messaging with an emphasis on mobile communication. A secondary goal is to create a decentralized IM platform that is much harder to track and block by the governments.

An explicit NON-goal: we are not building yet another Slack replacement.

Installing and running

See general instructions or docker-specific instructions.

Getting support

Helping out

  • If you appreciate our work, please help spread the word! Sharing on Reddit, HN, and other communities helps more than you think.
  • Consider buying paid support: https://tinode.co/support.html
  • If you are a software developer, send us your pull requests with bug fixes and new features.
  • If you use the app and discover bugs or missing features, let us know by filing bug reports and feature requests. Vote for existing feature requests you find most valuable.
  • If you speak a language other than English, translate the apps into your language. You may also review and improve existing translations.
  • If you are a UI/UX expert, help us polish the app UI.
  • Use it: install it for your colleagues or friends at work or at home.

Public service

A public Tinode service is available. You can use it just like any other instant messenger. Keep in mind that demo accounts present in sandbox are not available in the public service. You must register an account using valid email in order to use the service.

Web

TinodeWeb, a single page web app, is available at https://web.tinode.co/ (source). See screenshots below.

Android

Tinode for Android a.k.a Tindroid is stable and functional (source). See the screenshots below. A debug APK is also provided for convenience.

iOS

Tinode for iOS a.k.a. Tinodios is stable and functional (source). See the screenshots below.

Demo/Sandbox

A sandboxed demo service is available at https://sandbox.tinode.co/.

Log in as one of alice, bob, carol, dave, frank. Password is <login>123, e.g. login for alice is alice123. You can discover other users by email or phone by prefixing them with email: or tel: respectively. Emails are <login>@example.com, e.g. [email protected], phones are +17025550001 through +17025550009.

When you register a new account you are asked for an email address to send validation code to. For demo purposes you may use 123456 as a universal validation code. The code you get in the email is also valid.

Sandbox Notes

  • The sandbox server is reset (all data wiped) every night at 3:15am Pacific time. An error message User not found or offline means the server was reset while you were connected. If you see it on the web, reload and relogin. On Android log out and re-login. If the database was changed, delete the app then reinstall.
  • Sandbox user Tino is a basic chatbot which responds with a random quote to any message.
  • As generally accepted, when you register a new account you are asked for an email address. The server will send an email with a verification code to that address and you can use it to validate the account. To make things easier for testing, the server will also accept 123456 as a verification code. Remove line "debug_response": "123456" from tinode.conf to disable this option.
  • The sandbox server is configured to use ACME TLS implementation with hard-coded requirement for SNI. If you are unable to connect then the most likely reason is your TLS client's missing support for SNI. Use a different client.
  • The default web app loads a single minified javascript bundle and minified CSS. The un-minified version is also available at https://sandbox.tinode.co/index-dev.html
  • Docker images with the same demo are available.
  • You are welcome to test your client software against the sandbox, hack it, etc. No DDoS-ing though please.

Features

Supported

  • Multiple native platforms:
  • User features:
    • One-on-one and group messaging.
    • Video and voice calls. Voice messages.
    • Channels with unlimited number of read-only subscribers.
    • All chats are synchronized across all devices.
    • Granular access control with permissions for various actions.
    • User search/discovery.
    • Rich formatting of messages markdown-style: *style* → style, with inline images, videos, file attachments.
    • Forms and templated responses suitable for chatbots.
    • Verified/staff/untrusted account markers.
    • Message status notifications: message delivery to server; received and read notifications; typing notifications.
    • Most recent message preview in contact list.
    • Server-generated presence notifications for people, group chats.
    • Forwarding and replying to messages.
    • Editing sent messages.
  • Administration:
    • Granular access control with permissions for various actions.
    • Support for custom authentication backends.
    • Ability to block unwanted communication server-side.
    • Anonymous users (important for use cases related to tech support over chat).
    • Plugins to extend functionality, for example, to support moderation or chatbots.
    • Scriptable command-line tool for server administration.
  • Performance, reliability and development:
    • Sharded clustering with failover.
    • Storage and out of band transfer of large objects like images or document files using local file system or Amazon S3 (other storage systems can be supported with media handlers).
    • JSON or protobuf version 3 wire protocols.
    • Bindings for various programming languages:
      • Javascript with no external dependencies.
      • Java with dependencies on Jackson and Java-Websocket. Suitable for Android but with no Android SDK dependencies.
      • Swift with no external dependencies.
      • C/C++, C#, Go, Python, PHP, Ruby and many other languages using gRPC.
    • Choice of a database backend. Other databases can be added with by writing adapters.

Planned

  • Federation.
  • Location and contacts sharing.
  • Previews of attached documents, links.
  • Recording video messages.
  • Video/audio broadcasting.
  • Group video/audio calls.
  • Attaching music/audio other than voice messages.
  • Better emoji support.
  • Different levels of message persistence (from strict persistence to "store until delivered" to purely ephemeral messaging).
  • Message encryption at rest.
  • End to end encryption with OTR for one-on-one messaging and undecided method for group messaging.
  • Full text search in messages.

Translations

All client software has support for internationalization. The following translations are provided:

Language Server Webapp Android iOS
English
Chinese simplified
Chinese traditional
French
German
Hindi
Korean
Portuguese
Romanian
Russian
Spanish
Thai
Ukrainian
Vietnamese

More translations are welcome. In addition to languages listed above, particularly interested in Arabic, Bengali, Indonesian, Urdu, Japanese, Turkish, Persian.

Third-Party

Projects

Licenses

Screenshots

Android screenshot: list of chats Android screenshot: one conversation Android screenshot: video call

iOS screenshot: list of chats iOS screenshot: one conversation iOS screenshot: video call

Desktop web: full app

Mobile web: contacts Mobile web: chat Mobile web: topic info

SEO Strings

Words 'chat' and 'instant messaging' in Chinese, Russian, Persian and a few other languages.

  • 聊天室 即時通訊
  • чат мессенджер
  • インスタントメッセージ
  • 인스턴트 메신저
  • پیام رسان فوری
  • تراسل فوري
  • فوری پیغام رسانی
  • Nhắn tin tức thời
  • anlık mesajlaşma sohbet
  • mensageiro instantâneo
  • pesan instan
  • mensajería instantánea
  • চ্যাট ইন্সট্যান্ট মেসেজিং
  • चैट त्वरित संदेश
  • তাৎক্ষণিক বার্তা আদান প্রদান

chat's People

Contributors

5idereal avatar aforge avatar aihturie avatar alexman94 avatar andreas-eberle avatar arseniybanayev avatar benderpan avatar dilshans2k avatar ducmami avatar ericcontainer avatar evil0th avatar fstn avatar googlom avatar kimtaeyong98 avatar markeloff86 avatar omkar-tenkale avatar or-else avatar ovizro avatar pkrs avatar psvnlsaikumar avatar riandyrn avatar rkgarcia avatar saitensou avatar shmutalov avatar stavares843 avatar taylorchristie avatar tiagoalves avatar vapao avatar vardef avatar yiuterran avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chat's Issues

after last update the registration stopped working

Hi, after i made git pull when i am trying to sign up and i get the error:"Error: user not found or offline (404)", i didnt change any server code in go, also i reinstall database 2 times, so maybe i find a bug.
And in console i have the next msg:
2018/01/07 19:58:44 Server v0.13: pid=3596 started with processes: 4
2018/01/07 19:58:44 Using config from: '/home/bogdan/godev/src/github.com/tinode/chat/server/tinode.conf'
2018/01/07 19:58:44 Running as a standalone server.
2018/01/07 19:58:44 plugins: no active plugins found
2018/01/07 19:58:44 Serving static content from '/home/bogdan/tinode/example-react-js/' at '/x/'
2018/01/07 19:58:44 Listening for client HTTP connections on [:6060]
2018/01/07 20:04:47 Session.dispatch got '{"hi":{"id":"80026","ver":"0.13","ua":"TinodeWeb/0.13 (Linux x86_64) tinodejs/0.13"}}' from '[::1]:39220'
2018/01/07 20:04:47 Session.dispatch got '{"acc":{"id":"80027","user":"new","scheme":"basic","secret":"dGVzdDM0MjM0Mjp0ZXN0MzQyMzQy","login":true,"desc":{"public":{"fn":"test342342"}},"tags":["email:test342342"]}}' from '[::1]:39220'
2018/01/07 20:04:47 Session.dispatch got '{"sub":{"id":"80028","topic":"me","get":{"what":"sub desc"}}}' from '[::1]:39220'
2018/01/07 20:04:47 Sub to 'me' from 'usrsBPAj0q002k'
2018/01/07 20:04:47 hub: user's account unexpectedly not found (deleted?)
2018/01/07 20:05:49 sess.readLoop: websocket: close 1001 (going away)
2018/01/07 20:05:49 serveWebsocket - stop
2018/01/07 20:06:00 Session.dispatch got '{"hi":{"id":"116964","ver":"0.13","ua":"TinodeWeb/0.13 (Linux x86_64) tinodejs/0.13"}}' from '[::1]:39284'
2018/01/07 20:06:00 Session.dispatch got '{"login":{"id":"116965","scheme":"basic","secret":"dGVzdDp0ZXN0"}}' from '[::1]:39284'
2018/01/07 20:06:00 basic auth: invalid login
2018/01/07 20:06:26 sess.writeLoop: ping/websocket: close sent

package context: unrecognized import path "context"

Hello,
I get this error while I try to install from source:

# go get -tags rethinkdb github.com/tinode/chat/server && go install -tags rethinkdb g ithub.com/tinode/chat/server

Yields:

package context: unrecognized import path "context" (import path does not begin with hostname)

How can I fix it?

Failed to init DB: store: attept to Open an unknown adapter 'rethinkdb'

Hi, I just build from source and got server, when I run tinode-db tool, error says:

2018/03/17 20:23:13 Failed to init DB: store: attept to Open an unknown adapter 'rethinkdb'

rethinkdb I just installed from brew and using:

rethinkdb --bind all --daemon

to started it. I think tinode-db tool is using for init that database right?
But there was an error. I dont know why I am sure these are right:

  • I installed rethinkdb success, and run it;
  • I build server with both mysql and rethinkdb enable, and conf file using default rethinkdb.

Any suggestion about this?

js demo doesn't work now

I signed up from this, but nothing happened when I click "SIGN UP" button. The chrome development tools showed that no data had been sent.

[Ask Difference Between {del} & {leave}]

Hello, Gene

I have question regarding {del what=topic} & {leave unsub=true}. Are these both functions basically done something equivalent?

I noticed that these both functions basically deleting user subscription. Maybe the only difference is when we use {leave} we must already subscribed to the topic while {del} is not. So is my understanding correct?

Thanks

Error during image building

Hi,
I've got the error below whenever I execute the command:

go install -tags rethinkdb github.com/tinode/chat/tinode-db
/go/src/github.com/tinode/chat/server/db/rethinkdb/adapter.go:16:2: cannot find package "gopkg.in/gorethink/gorethink.v2" in any of:
/usr/local/go/src/gopkg.in/gorethink/gorethink.v2 (from $GOROOT)
/go/src/gopkg.in/gorethink/gorethink.v2 (from $GOPATH)

Do you have some clue about what's generating that error?

How to show list of online users by default?

Hello,
As users logs in, they encounter with a blank chat page and need to add user/groups, which is not very pleasant for a public chatroom were people don't necessary know who else are in the room.
I'm wondering how can change tinode to show the list of available users (or a public default group) to them, as they log in?

Thanks for your quick replies.

Error: user not found or offline (404)

Hi,gene sorry for disturbing,i download the latest react.js and tinode.js version 0.14 also has latest version on server, but i still get "Error: user not found or offline (404)".Maybe i am doing something wrong?Can you help me please?
2018-01-08 02-00-30
2018-01-08 02-00-51

Support Casbin as the authorization backend

Hi, Casbin is an authorization library that supports models like ACL, RBAC, ABAC.

Related to RBAC, Casbin has several advantages:

  1. roles can be cascaded, aka roles can have roles.
  2. support resource roles, so users have their roles and resource have their roles too. role = group here.
  3. the permission assignments (or policy in Casbin's language) can be persisted in files or database (Gorm or Xorm or any popular DBs).

And you can even customize your own access control model, for example, mix RBAC and ABAC together by using roles and attributes at the same time. It's very flexible.

Casbin can provide more flexibility and security than the current level-based access control. Let me know if there's any question:) Thanks.

[Ask About Delete Message]

Hello, Gene

I have question regarding deleting message on Tinode. Is it possible to selectively delete message / delete only one specific message? Because currently the functionality which exist is behaving like clear messages, right?

Thanks

discovery tags

Hi guys,this is the most awesome open-source product that i saw, but i found a bug, i cant create more then 3 tags on 'acc' it responds with error 500

[Ask About Cluster Design]

Hello, Gene

I have question regarding current cluster design. I found that user’s topic always sticked to a certain cluster node. Why?

In the event of node failure this will lead to users (which their topics sticked to that node) won’t be able to access their data nor contacted by others, right?

How trivial would it be to implement another database store

Hello,

How trivial would it be to implement another database store. My use case would involve a lot of traffic, so being able to use a database like redis or cassandra would be quite beneficial.

How trivial would it be to implement redis support, while taking advantage of features like redis pub-sub, which are important for an application such as this? Is this something I can tackle and create a pull request for without refactoring the entire application? (Bear in mind, I haven't gone through the code indept) .

EDIT:
ON more thought. Having the messages stored in a Cassandra database, and the meta data stored in Postgres, is the ideal scenario for me. Would this be possible?

installation err

while i am writing command "go get -tags rethinkdb github.com/tinode/chat/server && go install -tags rethinkdb github.com/tinode/chat/server"
i get next error: src/github.com/tinode/chat/server/ringhash/ringhash.go:79: undefined: fnv.New128a

[Issues on Push Message]

Hello, Gene

Currently I’m facing several problems when trying to implement following push message use cases in client app:

  1. FCM token refresh in the middle of user session
  2. User logout in app

So as far as I understand, it is possible for FCM token to be refreshed. When this event occurs, we need to update our existing token on the server.

Yet in Tinode, FCM token (called "deviceId" in Tinode) could only be updated in {hi}. So in case of token refresh occurs in the middle of user session, we need to break the session first to register new updated token.

So maybe there is a better way to do this which I'm missing?

The next issue occurs when single device is being used by multiple user. So for example User A & User B use single device together.

In Tinode, deviceId is associated with uid (link), yet store.Devices.Delete() is only called when deviceId is invalid (link).

Since User A & User B use the device together, then the deviceId would be same for them. So in case User A has been logout & User B logged in, then message for User A would be still delivered to User B.

So I think it's better if we also offers delete device functionality for user so the client could notify server which deviceId still used for certain user & which is not.

What do you think?


Also if I may suggest I think it's better if we differentiate between deviceId & fcm token though. The reason is because essentialy a device may have multiple tokens due to rotation / refresh.

Since basically store.Devices.Update() is defined as "upsert", then every unused fcm token would be just pile up on database. But if we differentiate between deviceId & fcm token then we could just update the associated token for the deviceId leaving more compact space on the database.

What do you think?

Thanks

Can I use this tinode for React Native mobile apps?

Hi.
I am going to implement the react native realtime chatting mobile app and I am very interested with this backend.
It seems that it is available with react.js and I am not sure if I can use it for react native.
Could you tell me if I can use it for react native?
Best wishes and regards.

[Cluster Not Working]

Hello,

How does to run server on cluster mode? I tried to execute 2 process of $GOPATH/bin/server which in first process use cluster-one.conf (listen to localhost:6060) and the second one use cluster-two.conf (listen to localhost:6062).

But after I accessing both of the web consoles (localhost:6060/x/example-react-js/ & localhost:6062/x/example-react-js/) I cannot login. I received error 500 instead.

So is this bug or the functionality is not yet done or I misconfigured both of my servers? I tried with devel branch but I also face the same issue.

screenshot 2017-07-22 09 39 43

screenshot 2017-07-22 09 24 09

Thanks

[Ask About `MsgDelRange`]

Hello, Gene

I have question regarding MsgDelRange. Why it is having exclusive end rather than inclusive one?

Maybe there is some design consideration behind this?

Thanks

large files support

hi,rethinkdb not support binary file over a MB. if a video 's size exceed. How to handle it?

Error: command out of sequence (409)

Hi, i made a last build version 0.14 and now when i make login or signup i got next error: Error: command out of sequence (409).
Is this on my side only?Did you get this issue?

Manually Install gorethink.v3 on Ubuntu 16.04

Hello,

While following the install guide, I had to manually install an additional package. I'm not sure if this is specific to my install, but I figured you might want to know so you can update your instructions.

root@instance-1:~# go get github.com/tinode/chat/server && go install -tags rethinkdb github.com/tinode/chat/server
go/src/github.com/tinode/chat/server/db/rethinkdb/adapter.go:16:2: cannot find package "gopkg.in/gorethink/gorethink.v3" in any of:
        /usr/local/go/src/gopkg.in/gorethink/gorethink.v3 (from $GOROOT)
        /root/go/src/gopkg.in/gorethink/gorethink.v3 (from $GOPATH)

go get gopkg.in/gorethink/gorethink.v3 fixes the error

[Ask About Hangup Signal]

Hello, Gene

I have question regarding hangup signal (syscall.SIGHUP) in Tinode. What are the possible causes for Tinode to receive hangup signal?

So I was trying to run Tinode cluster on EC2 instances behind load balancer. On each instances I was using nohup to run Tinode on the background. When I tried to use it, sometimes only one instances shutdown randomly, sometimes both. When I check the output on nohup.out I notice following consistent output: Signal received: 'hangup', shutting down.

Before I was running Tinode on cluster, I also tried to run Tinode on single instance & sometimes I get the same output. But in cluster setup, it is occurred more often. Especially when I tried to send large payload from another instance.

So what are the possible causes for this issue on Tinode?

Thanks

[Ask Purpose of Access Control on P2P Topic]

Hello, Gene

I have question regarding purpose of access control on P2P topic. So what is the purpose of it anyway?

The reason why I ask this question is because I found that the purpose stated in documentation is somewhat contradict with the implementation written on code. So with this question I would like to validate what I found because I think it is very fundamental.

In documentation (see here) I found that the purpose of it is for managing presence + banning user from initiating or continuing P2P conversation. So if there are user1 & user2 which have P2P connection, then after sometime user2 would like to block message from user1, then user2 would be just only need to remove “W” permission from user1.

But based on current implementation it is not possible to achieve that purpose. The reason is in current implementation it is not possible to change others permission on P2P topic, it is just for setting user own permission for filtering the data retrieved by user itself (which I personally think is somewhat useless on this context).

So in above case, user2 would only able to manage its own permission, so does with user1, so they cannot block each other in case they want to do it.

So which purpose is true? Managing the P2P connection or just for filtering data retrieved from the context? Or maybe you have another design decision?

Thanks a lot, Gene.

[acc] [cred] Cannot create a subscription with newly created user

Firstly, I am very impressed by this system and I appreciate all the effort you put into it!

I'm trying to simply create a user through websockets. I'll list all the messages I send and receive.

[hi]

{
  "hi": {
    "ver": "0.14"
  }
}

[acc]

{
  "acc": {
    "scheme":"basic",
    "user": "new",
    "secret":"dGVzdDp1c2Vy",
    "tags": ["Test User"],
    "desc":{
      "public":{
        "fn":"Test User"
      }
    },
    "cred": [{"meth":"email","val":"[email protected]", "resp":"123456"
    }]
  }
}

However after doing this it seems that while the user is created, I simply get a 500 internal server error when trying to create a new p2p message subscription from a default user (alice) to the newly created test user.

{
   "sub": {
        "topic": "<created users id ie: usrhHVAzk9Owww>",
        "get": {
            "what": "desc sub data"
        }
    }
}

response:

ctrl: {topic: "usrhHVAzk9Owww", code: 500, text: "internal error", ts: "2018-04-16T05:57:23.462Z"}

I am using docker, and the MySQL extension.

If you need any more information let me know!

[Ask About Server License]

Hello, Gene

I have question regarding server license. If we run Tinode on our own servers to serve our public users, does this count as act of "distribution"?

So we would like to integrate Tinode with our own existing system. To do so we need to modify Tinode in the way that it would expose our internal architecture.

As far as I know in GPL we need also to make our modified source code public whenever the distribution of the software is made. Yet in our case it is impossible to do so after the modification is done.

So we would like to confirm first what is the meaning of "distribution" here for Tinode.

Thanks a lot, Gene

[Weird Bug On Forwarding Request to Cluster Node]

Hello, Gene

I’m facing a weird bug when trying to set private field of user’s fnd topic which apparently located on different cluster node. It always return following error message:

cluster: forwarding request to node 'two’
cluster: call failed to 'two' [gob: type not registered for interface: []interface {}]

The culprit is this line: https://github.com/tinode/chat/blob/devel/server/cluster.go#L135. But I don’t understand why it throws error while for forwarding normal message it works.

Maybe you have idea why this error happens, Gene?

Thanks

[question] groups of 16?

Do you plan to increase the possible group size, or is it going to stay at 16? If so, why?

Thanks

404 page not found

Hello,
I have followed the instructions but get blank page at http://127.0.0.1:6060/x/ with 404 page not found while the server is running:

me@pc:~/Desktop$ $GOPATH/bin/server -config=$GOPATH/src/github.com/tinode/chat/server/tinode.conf -static_data=$HOME/tinode/example-react-js/
2018/01/20 18:28:06 Server v0.14: pid=8559 started with processes: 8
2018/01/20 18:28:06 Using config from: '/home/me/go/src/github.com/tinode/chat/server/tinode.conf'
2018/01/20 18:28:06 Running as a standalone server.
2018/01/20 18:28:06 plugins: no active plugins found
2018/01/20 18:28:06 Serving static content from '/home/me/tinode/example-react-js/' at '/x/'
2018/01/20 18:28:06 Listening for client HTTP connections on [:6060]

tionde client file structure:

me@pc:~$ tree /home/me/tinode/
/home/me/tinode/
└── example-react-js-master
    ├── css
    │   └── base.css
    ├── drafty.js
    ├── img
    │   ├── ignasi_pattern_s.png
    │   ├── logo32x32a.png
    │   ├── logo32x32.png
    │   └── logo.svg
    ├── index.html
    ├── README.md
    ├── tinode.js
    ├── web-desktop-2.png
    ├── web-mob-chat-1.png
    ├── web-mob-contacts-1.png
    ├── web-mob-info-1.png
    └── web-mob-new-chat-1.png

How can I debug/fix it?

code: 404

Hello,
I followed the instructions but could not see the web interface.
I run
/home/me/go/bin/server -config=/home/me/go/src/github.com/tinode/chat/server/tinode.conf -static_data=/home/me/Desktop/example-react-js/

But when I visit:

http://localhost:6060/home/me/Desktop/example-react-js/

I get:

{
ctrl: {
code: 404,
text: "not found",
ts: "2017-09-25T08:55:41.132Z"
}
}

I have extracted the react files and to example-react-js and copied tinode.js there.

The server output in the terminal:

me@pc:~/go$ /home/me/go/bin/server -config=/home/me/go/src/github.com/tinode/chat/server/tinode.conf -static_data=/home/me/Desktop/example-react-js
2017/09/25 10:55:22 Server v0.13: pid=24955 started with processes: 8
2017/09/25 10:55:22 Using config from: '/home/me/go/src/github.com/tinode/chat/server/tinode.conf'
2017/09/25 10:55:22 Running as a standalone server.
2017/09/25 10:55:22 Serving static content from '/home/me/Desktop/example-react-js'
2017/09/25 10:55:22 Listening for client HTTP connections on [:6060]

Any idea why this error happens?

Why RethinkDB?

As I further known that RethinkDB company were disbanded. Does RethinkDB is a long term choice to be used in such as a good library? (Just my confusion, not about library bugs or other issues).

[Ask About {ctrl} Packet Usage]

Hello, Gene

I have question regarding {ctrl} packet. Can we treat this packet as end of response packet from server?

Thanks

Can not start server

Hi,

When I exec this command
sudo docker run --rm --name tinode-init --link rethinkdb tinode-init-db
face with this error
docker: Error response from daemon: Cannot link to a non running container: /rethinkdb AS /tinode-init/rethinkdb.

When I want to start tinode-init-db with follow command
sudo docker run tinode-init-db
face with this error

2018/02/11 12:30:21 Initializing DB...
2018/02/11 12:30:21 Failed to init DB: gorethink: dial tcp :0: getsockopt: connection refused

Please help me to solve this problem.
Thanks

[User Still Receive Push Notification When Online]

Hello, Gene

I found that in current push implementation, if a user doesn’t subscribe to topic, even though he is online, he will still receive push notification when there is new message on the topic.

You could see the details here, which shown topic only exclude device ids which subscribed to current topic.

I think this behavior will annoys user though. Because even though user is already online in app he would still receive notification.

What do you think?

Thanks

Docker install issue

Hi. I have a problem installing tinode server on windows 10 using docker.
On point 5 - $ docker run --rm --name tinode-init-db --network tinode-net tinode-init-db in console i've got this:

standard_init_linux.go:195: exec user process caused "no such file or directory"

On stackoverflow i don't found decision for solving this problem. Do you have any ideas?

Installation with docker error

I follow your docker installation instruction. When I build initializer image from Dockerfile provided, I get this error "error: RPC failed; curl 56 GnuTLS recv error (-54): Error in the pull function." in "RUN go get -tags rethinkdb github.com/tinode/chat/tinode-db && go install -tags rethinkdb github.com/tinode/chat/tinode-db". And is there any way to solve this? Thank you.

[Ask About Hard Delete Message]

Hello, Gene

I have questions regarding hard delete message. So how does offline user supposed to know when the message(s) in certain topic has been hard deleted?

I thought that supposedly offline user receive me notification when message(s) is hard deleted (see here). But apparently it is not, because {pres} would be silently dropped (see here).

So how does client for offline user supposedly to know if it should update its messages cache for the topic?

Thanks

Timestamp of last contact for subscription

I'd like a simple way to sort my subscriptions (conversations) when first receiving the information on them. Currently there is only the updated timestamp which is only changed when the subscription is actually changed. The only way (I can think of) to get this information is to get sub info to get the last message, then grab that using the sub again for the topic with a single ID for the message:

sub: {
    topic: "usr3424rwefsdf",
    what: "get",
    get: {
        since: "<lastId>",
        limit: 1
    }
}

It would make sense to receive the last contact date in the info for the initial me subscription. I don't have much experience with Go but I'd like to contribute as much as possible. I am writing an angular4 implementation for your chat and I plan on open sourcing it once completed.


sub: {
                topic: 'me',
                get: {
                    what: "desc sub data info", // info would also include last contacted timestamp.
                }
            }

server not found

server not found after running in dockerized environment .

localhost:6060
gives : 404 not found

[Ask About Tinode ACS]

Hello, Gene

I have question regarding Tinode ACS.

So I'm still not fully understand why would we need both ModeWant & ModeGiven when defining user access to the topic. Shouldn’t be ModeGiven only is enough to define it?😅

I mean ModeWant is only useful when user want to mute the conversation, right? But for the most of the use cases, ModeGiven should be enough, right?

For example when group owner want to promote a member to become admin, it would give the member "AS" permissions. Naturally, user would become admin directly.

But since there is a user's ModeWant, user need to elevate itself to admin first before it able to become the admin (set its ModeWant to also include "AS"). So why must we take this two steps when just once should be enough?

Maybe there is a design consideration behind this implementation?

Thanks

Error on installing with docker

Hi

When I install the tinode server whit docker, face with this error:

docker build --tag=tinode-init-db init-rethinkdb
unable to prepare context: path "init-rethinkdb" not found

Thanks.

Docker image

Any plans to create a docker image that's in docker hub?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.