Giter VIP home page Giter VIP logo

webapp's Introduction

Tinode Web

Briefing

Single-page web chat application for Tinode. The app is built on React. The Tinode javascript SDK has no external dependencies. Overall, it's a lot like open source WhatsApp or Telegram web apps.

Although the app is generally usable, keep in mind that this is work in progress. Some bugs probably exist, some features are missing. The app was tested in the latest Chrome & Firefox only. NPM package is available.

Try possibly newer or older version live at https://sandbox.tinode.co/.

For demo access and other instructions see here.

Installing and running

This is NOT a standalone app, this is just a frontend, a client. It requires a backend. See installation instructions. See instructions for enabling push notifications.

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.

Internationalization

The app is fully internationalized using React-Intl. The UI language is selected automatically from the language specified by the browser. A specific language can be forced by adding #?hl=XX parameter to the URL when starting the app, e.g. https://web.tinode.co/#?hl=fr.

The app is currently available in the following languages:

  • English - default
  • Chinese simplified
  • Chinese traditional
  • French
  • German
  • Korean
  • Romanian
  • Russian
  • Spanish
  • Thai
  • Ukrainian

More translations are welcome. See instructions.

Not done yet

  • End-to-End encryption.
  • Emoji support is weak.
  • Mentions, hashtags.
  • Previews not generated for links and docs.
  • Location and contact sharing.
  • Recording video messages.

Other

Responsive design

Desktop screenshot

Desktop web: full app

Mobile screenshots

Mobile web: contacts Mobile web: chat Mobile web: topic info Mobile web: forward message Mobile web: video call Mobile web: change avatar

webapp's People

Contributors

5idereal avatar aforge avatar bukharney avatar kant avatar kimtaeyong98 avatar linsui avatar maximbukanov avatar mzch avatar natowi avatar npmcdn-to-unpkg-bot avatar or-else avatar riandyrn avatar sun2008mt avatar tandr3w avatar yash-vardhan-github 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

webapp's Issues

multiple listener support

now in web app, tinode.js only allow one callback for a promise.
but some situation we want multiple callback as listener ,because many react component may pay attention to the promise not only tinodeweb.jsx .
so is it better to use callback list or redux-thunk /saga?

Expanding textarea, emojis etc (Features request)

  1. Tinode's textarea should expand upwards when user is typing a message. In a case of a large message is difficult to read the written text when only 2 lines are visible,

  2. There should be a possibility to deactivate sending messages with "enter". Many people don't care about it but at the same time many people hate that it's not possible to create a new paragraph with "enter".

  3. Emojis/stickers. Emojis are essential to communicate emotion, something that words cannot portray. Nowadays, chatting without emojis is unthinkable.

https://github.com/mervick/emojionearea
(emojionearea expands textarea upwards or downwards)

https://github.com/pladaria/react-emojione

Add members to groups fails

Searching user by name / email / UserId fails if I try to add a user to a group.

No log entry during searching for User. No contacts found.

Webapp: reconnectiong problems in mobile phones

I don't see these problem always but periodically.

Problem 1

I leave home where I use wifi and phone automatically connects to the mobile Internet. I turn on phone's screen with Tinode's webapp already open and I see message "Disconnected. Reconnecting in...". It's normal and nothing strange here. The problem starts when sometimes I see message like "reconnecting in" a few minutes. For example:

reconnect

I was not able to send a message almost 3 minutes. And the message even didn't show the link "Retry". I reloaded the webapp and it immediately connected.

Problem 2

The same scenario. I leave home where I use wifi and phone automatically connects to the mobile Internet. I turn on phone's screen and see message in the webapp "Disconnected. Reconnecting in 1..." and a link "reconnect". But his message does not disappear. Sometimes there is a link "Retry" but sometimes not. Even if there is a link and I tap on it, absolutely nothing happends.

reconnect2

The message just hangs and doe snot disappear despite to the fact that webapp already has established connection to the server. How do I know it? When this message "reconnecting in 1" I see in the contacts list, I can access any topic, send messages and I don't see "Disconnected" message anymore. For some reason it doe snot disapper after establishing connection.

Possible solutions

I don't know the solution for problem 2. For problem 1, I guess it should work in the following way. When phone's screen has been off and user turns it on, and the webapp is disconnected, it should retry reconnecting immediately. And only then if connection could not be established, set a timeout.

It's the same like with online/offline status, Tinode should fix when phone's screen is off and when is on (or browser tab with webapp is not visible / visible in a case of computer) - reset reconnection time when Tinode's webapp becomes visible, set online/offline status when the app is visible/not visible.

[Unable to Send Message for Newly Subscribed P2P Topic]

Hello,

I found bug in sending message for newly subscribed user to P2P topic. The user won’t be able to send message due to insufficient default permission (missing ‘W’ permission).

You could reproduce this bug by using these steps:

  • create new user
  • create new chat, find someone (I’m using bob —> email:[email protected])
  • start chat, then try to send message
  • open chrome dev console
  • you will find 403 error

The reason why this error happens is because when client send “sub” command to P2P topic without specifying the permission request, the default value for acs.want is “JRPD”, yet server give “JRWP”, so the resulted acs.mode is “JRP” (missing ‘W’ permission). With this mode user doesn’t have enough permission to send message to the peer.

[06:58:37:169] out: {"sub":{"id":"86972","topic":"usrlDBwwM89EXs","get":{"what":"data sub desc"}}}

[06:58:37:464] in: {"ctrl":{"id":"86972","topic":"usrlDBwwM89EXs","params":{"acs":{"want":"JRPD","given":"JRWP","mode":"JRP"}},"code":200,"text":"ok","ts":"2017-07-30T06:58:37.296Z"}}

You could see the more details on dev console.

Thanks.

Show last message in contact-comment

Which is the best way to retrieve contact list with the last message in it ,and then I can show it in the contact-comment blcok which now shows the private field now.

Web application does not work locally

I cloned the application from the repository.
Next yarn install
Next problem #31
made the necessary changes
Next npm run build:dev

C:\_Projects\Tinode\webapp>npm run build:dev

> [email protected] build:dev C:\_Projects\Tinode\webapp
> webpack --mode development --output ./umd/index.dev.js

Hash: a48930031c495acd1cf8
Version: webpack 4.39.3
Time: 2982ms
Built at: 2019-08-29 15:08:29
           Asset     Size  Chunks                    Chunk Names
    index.dev.js  568 KiB    main  [emitted]  [big]  main
index.dev.js.map  559 KiB    main  [emitted]         main
Entrypoint main [big] = index.dev.js index.dev.js.map
[0] multi ./src/index.js 28 bytes {main} [built]
[./src/config.js] 828 bytes {main} [built]
[./src/index.js] 941 bytes {main} [built]
[./src/lib/blob-helpers.js] 5.73 KiB {main} [built]
[./src/lib/host-name.js] 1.1 KiB {main} [built]
[./src/lib/local-storage.js] 1.48 KiB {main} [built]
[./src/lib/navigation.js] 2.83 KiB {main} [built]
[./src/lib/strformat.js] 1.56 KiB {main} [built]
[./src/lib/utils.js] 1.62 KiB {main} [built]
[./src/messages.json] 19.5 KiB {main} [built]
[./src/views/info-view.jsx] 26 KiB {main} [built]
[./src/views/tinode-web.jsx] 54.6 KiB {main} [built]
[react] external "React" 42 bytes {main} [built]
[react-dom] external "ReactDOM" 42 bytes {main} [built]
[react-intl] external "ReactIntl" 42 bytes {main} [built]
    + 52 hidden modules

End Run Error:

C:\_Projects\Tinode\webapp>node src\index.js
C:\_Projects\Tinode\webapp\src\index.js:3
import React from 'react';
       ^^^^^

SyntaxError: Unexpected identifier
    at new Script (vm.js:79:7)
    at createScript (vm.js:251:10)
    at Object.runInThisContext (vm.js:303:10)
    at Module._compile (internal/modules/cjs/loader.js:657:28)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
    at startup (internal/bootstrap/node.js:283:19)

C:\_Projects\Tinode\webapp>

Please help launch. (

React v16.9.0
NodeJS v10.15.0

Convertsation jumps to the first message after showing an image

When I click on some image, conversation jumps to the first message after I close the opened image.
See the screenshot - image with roses is the last received message. When I open and close it, I see the first message of the conversation - chat has jumped to the top.

tinode6

How to get topics and contacts?

Hi @or-else,

I play around with tinode.js to understand how it works and maybe write a small (test) client. Searched documentation and found for example "contacts()", but not get it working in my example code.

Started with your example code connect and login works fine, but haven't understand how to get contacts or topic list?

<!DOCTYPE html>
<html lang="de">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Tinode Client Test</title>
    <!--<script crossorigin="anonymous" src="https://unpkg.com/tinode-sdk/umd/tinode.prod.js"></script>-->
    <script crossorigin="anonymous" src="https://unpkg.com/tinode-sdk/umd/tinode.dev.js"></script>
    <script>
        const tinode = new Tinode("MyTinodeClient", "<DOMAIN>:443", '<SALT>', null, true);
        tinode.enableLogging(true);
        // Add logic to handle disconnects.
        tinode.onDisconnect = function(err) {
            console.log("Disconnected!");
            console.log(err);
        };
        // Connect to the server.
        tinode.connect().then(() => {
            // Connected. Login now.
            var login = 'myUsername';
            var password = 'myPassword';
            return tinode.loginBasic(login, password);
        }).then((ctrl) => {
        // Logged in fine, attach callbacks, subscribe to 'me'.
        const me = tinode.getMeTopic();
        me.onMetaDesc = function(meta) { };
            // Subscribe, fetch topic description and the list of contacts.
            me.subscribe({get: {desc: {}, sub: {}}});

            /* HOW TO GET TOPICS OR CONTACTS? */   

        }).catch((err) => {
            // Login or subscription failed, do something.
            console.log("Catch error...");
        });
    </script>
  </head>
  <body>

  </body>
</html>

Issue in creating group

http://localhost:6060/index-dev.html#newtpk/grpz3L0HlJQKzE?tab=grp

if user creates a group from new group, the data is loaded on html page but it is not inserted into database, in table topics where column public and tags is null.
due to this when i add the users in the group it shows the title not found and also if the owner refreshes the browser same happens.

but if we add the same through info and again enters the group name it is updated in database.

kindly solve this issue

The downloaded file is damaged

console.log(Drafty.getDownloadUrl(data));
console.log(Drafty.getEntityMimeType(data));
console.log(Drafty.getEntitySize(data));
console.log(Drafty.getContentType(data));
let url = Drafty.getDownloadUrl(data);
let filename = data.name;
let mimetype = Drafty.getEntityMimeType(data);
const nim = this.$store.state.nim;//Vuex new() Tinode
var downloader = nim.getLargeFileHelper();
downloader.download(url, filename, mimetype);
downloader
.download(url, filename, mimetype, loaded => {
console.log(loaded);
})
.then(() => {
// this.setState({ downloader: null, progress: 0 });
})
.catch(err => {
console.log(err.message);
});

GRPC: group owner can not grant "delete" permission to a group member

User usrHGshCFWe5aI is owner of the group grpi4CSwukyuPQ. Now group's owner want to grant "delete" permission to the group member yoyoyo ( usrpDPgde-kKYI)

I2021/03/09 08:58:20 grpc: session started Qxm2-_EMNA4 188.165.249.27:56434 2
I2021/03/09 08:58:20 grpc in: hi:<id:"644209" user_agent:"php/grpc" ver:"1" lang:"es-ES" > Qxm2-_EMNA4
I2021/03/09 08:58:20 grpc in: login:<id:"198929" scheme:"token" secret:"\266\323\3202\336P\365\254\241\010K`\036\000\001\000\001\000Q\023\323<\230'\340\326k\326\316T6e\037x\312=|SJM\241\210\205\310\030!\017Z:\342" > auth_level:ROOT Qxm2-_EMNA4
I2021/03/09 08:58:20 grpc in: sub:<id:"775653" topic:"grpi4CSwukyuPQ" get_query:<what:"desc" > > on_behalf_of:"usrHGshCFWe5aI" auth_level:ROOT Qxm2-_EMNA4
I2021/03/09 08:58:20 grpc in: set:<id:"645043" topic:"grpi4CSwukyuPQ" query:<sub:<user_id:"usrpDPgde-kKYI" mode:"JRWPD" > > > on_behalf_of:"usrHGshCFWe5aI" Qxm2-_EMNA4

The request is successful but permissions don't change and user usrpDPgde-kKYI don't see the option to delete messages posted by other users (delete for all).

When I check permissions for user usrpDPgde-kKYI in the members' list I don't see the permission "D".

group1

However, when I click on "Edit permissions" for user yoyoyo ( usrpDPgde-kKYI) I see that permission "D" is checked:

group2

As I see the problem is only with permission "D". For example, if if group owner removes permission "W" for a user, it works and user can not write messages anymore.

It looks like a bug.

[Unable to Resubscribe P2P Topic]

Hello,

I found an issue regarding resubscribing P2P topic. The issue is I cannot resubscribe the p2p topic which I have previously deleted.

You could reproduce this issue by following these steps:

  1. login
  2. delete existing p2p topic
  3. re-find the p2p topic which previously deleted by using “fnd” topic
  4. try to subscribe that topic, it will throw Error 500

I just recently try this on both local & online example, both of them have the same issue.

Thanks

It´s not possible to change MAX_INBAND_ATTACHMENT_SIZE value

It´s not possible to change the default

export const MAX_INBAND_ATTACHMENT_SIZE = 195584;

value . I am trying to decrease it to avoid saving images and files in MySQL. When I put any other value smaller or greater, appears this error:

blob-helpers.js:114 Uncaught ReferenceError: bytesToHumanSize is not defined at Image.N.o.onload (blob-helpers.js:114)

contact-views will not sort right now after send message in the topic

when i send a message in my selected topic such as group1, the topic will not go up right now.
i then click another topic,and leave,and then sub group1, then group1 go up.

i check the sort algorithm is like:return (b.touched || 0) - (a.touched || 0),
but after send message, the "touched" not updated right now,So I modify the code like this:
in tnMeContactUpdate(what, cont) {
//call a new func and send the cont.updated
else if (what == 'read') {
//cont:{"updated":"2019-09-02T02:01:22.566Z"
this.resetContactListWithUpdated(cont.updated);
}
.........
}

the new func like resetContactList:
resetContactListWithUpdated(updated){
const newState = {
chatList: []
};
if (!this.state.ready) {
newState.ready = true;
}
this.tinode.getMeTopic().contacts((c) => {
if (this.state.topicSelected == c.topic) {
newState.topicSelectedOnline = c.online;
newState.topicSelectedAcs = c.acs;
//force the topic touched as updated
c.touched=updated;
}
newState.chatList.push(c);
});
// Merge search results and chat list.
newState.searchableContacts = TinodeWeb.prepareSearchableContacts(newState.chatList, this.state.searchResults);
this.setState(newState);
}

after then:
when i send a message in a topic, the topic immediately go up.
but i think this way is not the best solution, The best solution should fix the "touched"
on the server side.

How to create a new group topic?

I apologize for such questions. In the documentation for the client, I did not find a method for creating a group topic with parameters.

I began to parse webapp and found these functions:

  // Request to start a new topic. New P2P topic requires peer's name.
  handleNewTopicRequest(peerName, pub, priv, tags) {
    const topicName = peerName || this.tinode.newGroupTopicName();
    const params = {
      _topicName: topicName,
    };
    if (peerName) {
      // Because we are initialing the subscription, set 'want' to all permissions.
      params.sub = {mode: DEFAULT_ACCESS_MODE};
      // Give the other user all permissions too.
      params.desc = {defacs: {auth: DEFAULT_ACCESS_MODE}};
    } else {
      params.desc = {public: pub, private: {comment: priv}};
      params.tags = tags;
    }
    this.setState({newTopicParams: params}, () => {this.handleTopicSelected(topicName)});
  }

  // New topic was creted, here is the new topic name.
  handleNewTopicCreated(oldName, newName) {
    if (this.state.topicSelected == oldName && oldName != newName) {
      // If the current URl contains the old topic name, replace it with new.
      // Update the name of the selected topic first so the navigator doen't clear
      // the state.
      this.setState({topicSelected: newName}, () => {
        HashNavigation.navigateTo(HashNavigation.setUrlTopic('', newName));
      });
    }
  }

Where is the Tinode method call to create a group topic with parameters?

Image icon in a message preview appears and disappears

I see this problem only in my Android mobile phone but not in computer. In both devices I use Chrome browser.

I open the webapp and in the contacts list I only see the following message preview: "Hello how are you?"

app5

I tap on the topic and see that the last message contains not only "How are you?" but also an image. I return to the contacts list and now message preview is displayed correctly (with image).

app6

I close the webapp and when it open again, I see the same problem in the contacts list - only "How are you?", without image icon.

always sort chatList when invalidate

When invalidate,the chatList in contacts-view.js line 30:
nextProps.chatList.map((c) => {
always sort whether chatLists have changed or not.

I think here should check if chatList changed like:
const {chatList}=nextProps;
if(chatList!==prevState.chatList){
nextProps.chatList.map((c) => {

and at the final of getDerivedStateFromProps,
set new chatList to states like:
return {
chatList:chatList,
contactList: contacts,
archivedCount: archivedCount
};

Using already registered Email address for new registration won't get error warning until validation code is entered

I tried to register (sign up) a new account with an already registered Email, and it succeeds at the first step and I received the verification code via email. But when I entered the code and click confirm, a warning came out saying that duplicated credentials. I would expect that this warning should come in the first step and the verification Email should not be sent if it's already registered. Is that the design like so or it's a bug?

Runtime webapp update / reload?

After I deploy new tinode version I have problems with the webapp added to homescreen (for example enable / disable notifications doen't work, force reload page).

Maybe it should be possible to

  1. reload (full screen) app with "swipe to reload"
  2. webapp runtime update (download newer cached files like css, js or reinstall latest service worker) notification?

Enter confirmation code without effect // hardcoded domain name in email

Hi I tried to verify by confirmation code after get the email.
Entered code and clicked confirm, but no effect.

Looked at the confirmation link but it's hardcoded to api.tinode.co. Activation was successful by modifiy the "Click" link to my own domain and then click confirm button works for me.

I just found one difference. Without link the code isn't in the url. If I use the (modified) link the code is included

https://<MODIFIED_DOMAIN>/#cred?method=email&code=808410

So it looks like the confirmation submit need to be fixed and the verification email shouldn't be hardcoded to api.tinode.co.

Notifications can't be activated after fresh installed tinode & mysql db

webapp works fine with desktop browsers. After a reinstall of tinode docker container I have some problems with notifications with Chrome for Android Browser.

I cleared cache to reset notifications, but can't subscribe in tinode webapp settings. Checkbox can't be checked and no reaction. Worked until I reinstalled tinode with a fresh mysql database. Registered new user. All and also webpush notifications are fine with desktop and another test android phone (Chrome too).

But my own phone will not subscribe to notifications again...

Any idea if that could be a bug and how to debug webapp notifications with android phone / mobile chrome?
Sounds like the same problem as a fried has with it. He never get webpush notifications work.
He has an old phone (Android 6), I have a One Plus 5 with Android 8.1.

Received by recipient also if push notification is triggered?

At the moment a message is marked as sent, but not received also if the recipient have received a push notification.

Message should marked as delivered (but unread) also if tinode is closed, but the recipient device have received a push notification?

Cannot update inactive topic

When I want to update a topic ,Why does It always warn "Cannot update inactive topic" even if the topic if created by myself ,unless I clicked the topic first ? And after I clicked other topic in the list,then previous topic becomes unsubscribed again

Browser notifications

"Browser push notifications are not implemented."

Is it planned in the near future? Would be great for desktop browser and closed browser notifications with mobile / android.

[Unable to Delete Topic]

Hello,

I found issue when trying to delete inactive topic from my topic list. The issue is I cannot delete it, I must first activate the topic (by selecting it) then delete it. I also tried in online example just earlier and I found the same issue.

You could reproduce this issue by using following procedure:

  1. login
  2. don’t select any topic
  3. try to delete any topic

or by using following procedure:

  1. login
  2. select any topic
  3. try to delete another topic which hasn’t been selected before

I don’t know if this is server issue or just front-end issue. But since I found it in example app, so I just put it here.

Thanks

After building the app all texts are marked as !![OBSOLETE]!! or disappear

Webapp version: 0.16.10
Tinode-sdk version: 0.16.10

I have updated npm.
After building the app, all spanish, russian, etc texts in /src/i18n forlder files are marked as !![OBSOLETE]!!, for example:
"validate_credential_action": ":!![OBSOLETE]!!:confirmar",

Texts are being deleted from /src/i18n/en.js file and after building contains only this line:
{}

After building there are no texts in /src/messages.json file. Only:

{
  "en": {},
  "es": {},
  "ru": {}
...
}

Webapp: user who turns off computer hangs forever online

It's not actally a bug and not a feature request but a problem that should be fixed to avoid confusing situations between users.

Alice uses webapp in Windows 97 computer, Chrome browser.

Dave uses webapp in Android phone, Chrome browser.

Alice and Dave are chatting and then Alice turns off (hibernates) her computer without closing browser.

Dave sees that Alice is still online and send one more message. Alice does not answer.
After 1 hour Dave still sees that Alice is online. Send a message but Alice does not answer.
The same after 3 hours.

Then Bob closes the webapp in his phone and opens it again. Now he sees that Alice has been seen 3 hours ago.

So, the problem is the following: user who turns off (hibernates) computer will be visible as "online" until the recipient reloads the application.

Incorrect online status display was already described here. User should not be "online" if browser's tab with Tinode is not active (visible) because turned on computer does not mean that user is using using computer or Tinode's webapp.

The situation where an user is seen online even if his computer is turned off is even more strange.

[Question] Web app with separated html, css and js files instead of single-page app?

I like tinode and the web app client, but I think it would be easier to extend and maintain if the code would be separated in html / template, css and js files instead of a single-page app?

If other people interested in such a web app and maybe could help with testing and comits I could take a look into tinode.js, do some tests and start it. I don't know if I have the time and experience to finish it, but I would give it a try.

Message previews internationalization and style

I don'[ t know how to submit pull requests to the devel, so I post it here.

Message previews feature in the contacts list is great but it needs to be internationalized. draftyFormatter should use different colors. If not, type of the message - "Image", "File" etc looks like the first word of a message.

Below are my suggested changes:

/src/i18n/en.js

Add lines:

"prev_image": "Image",
"prev_file": "File",
"prev_form": "Form"

/src/i18n/es.js

Add lines:

"prev_image": "Imagen", 
"prev_file": "Archivo",
 "prev_form": "Formulario"

/src/i18n/ru.js

Add lines:

"prev_image": "Изображение",
"prev_file": "Файл",
 "prev_form": "Форма"

The same should be done in Chinese, Korean etc. Unfortunately, I don't know these languages

/src/widgets/contact.jsx

change line;
values = [<i key="im" className="material-icons">photo</i>, 'Picture'];
to:
values = [<i key="im" className="material-icons color_prev">photo</i>, <span className="color_prev"><FormattedMessage id="prev_image" defaultMessage="Image" description="Image" /></span>];

change line:
values = [<i key="fm" className="material-icons">dashboard</i>, 'Form: '].concat(values || []);
to:
values = [<i key="fm" className="material-icons color_prev">dashboard</i>, <span className="color_prev"><FormattedMessage id="prev_form" defaultMessage="Form:" description="Form" /></span>].concat(values || []);

change line:
values = [<i key="ex" className="material-icons">attachment</i>, 'Attachment'];
to:
values = [<i key="ex" className="material-icons color_prev">attachment</i>, <span className="color_prev"><FormattedMessage id="prev_file" defaultMessage="File" description="File" /></span>];

/css/base.css

add line:

.contact-comment .material-icons .color_prev,.color_prev{color: #A0CDF5;}

(Probably it's not a perfect solution for css.)

Result:

app4

If a message contains not only image but also text, I guess, there is enough only to show image icon in the preview, without the word "Image". It only occupies space and icon already indicates that a message contains image. But i't not so important.

Inline images problem in devel version

Broeser: Chrome

Yesterday I downloaded the devel version and there are some problem with dimensions of online images.
Firstly, I was thinking that I have this problem because I have modified the css file - colors etc, but then I rebuilded the app with original css file and problem still exists.

Original css file

  1. Each image has different dimensions. I don't know, probably it's by design, but it creates a sense of chaos. If it's by design, I suggest to display all the images in the conversation of the same size, regardless of the original size. It will make the conversation visually clean.
  2. Right bubble. The right margin is bigger then the left.

app1

  1. Horizontal images look huge but vertical images small.
  2. In case of vertical images or small horizontal images, if message does not contain any text but only image, the date appears not below of the image but in the same line.

app2

Modified css file

Dimensions of inline images in rem make images very huge. Probably it's ok in the mobile phones but in computer 1 image can occupy almost 50% of the conversation window. In modified css file and I had online-image dimensions set in px to have more control of dimensions (the same with and the same size). Now it does not work. Values in px are being ignored and image appears even bigger than the bubble, and horizontal scrollbar appears

app3

I saw problems with online images in some previous version but then everything looked ok. Now there is a problem again.

Transmission confirmation with offline notifications

Tinode show different message states like WhatsApp.

  1. sent
  2. delivered
  3. read by recipient

I tested webapp with closed browser push notifications and looked at the message state.

The message is shown as still not delivered, but the android phone shows the received push notification. Sender still see "sent". Recipient opens the webapp and see one new / unread message in the chat / conversation list.

Webapp is open, and the message is delivered, but still "sent" state.

Recipient opened the conversation with the new message and now the sender get the "delivered" and "read by recipient" indicator.

Would it possible to show the sent message as delivered (unread) after the recipient get the push notification about the new message?

How to add tel to tags?

Hi "tel" is a restricted tag.

2018/09/06 13:07:10 topic[fndTmaQkMdvXhI] meta.Set.Tags failed: attempt to mutate restricted tags

But how to add phone number to tags? And it would be difficult to verify it without phone number verification.

unable to register service worker / webapp isn't updated in latest docker image

Tested with latest docker image published some minutes ago

Messaging: We are unable to register the default service worker. Failed to register a ServiceWorker: A bad HTTP response code (404) was received when fetching the script. (messaging/failed-serviceworker-registration).

image

looks like webapp isn't updated and service-worker is missing (latest commit 10 days ago)?

# ls -lh /opt/tinode/static/
total 32
drwxr-xr-x    2 501      dialout     4.0K Sep 21 11:23 audio
drwxr-xr-x    2 501      dialout     4.0K Sep 21 11:23 css
drwxr-xr-x    2 501      dialout     4.0K Sep 21 11:23 img
-rw-r--r--    6 501      dialout     2.4K Sep 21 10:32 index-dev.html
-rw-r--r--    6 501      dialout     1.3K Sep 21 10:32 index.html
-rw-r--r--    6 501      dialout      509 Sep 21 10:32 manifest.json
drwxr-xr-x    2 501      dialout     4.0K Sep 21 11:23 src
drwxr-xr-x    2 501      dialout     4.0K Sep 21 11:23 umd

Still webapp search doesn't work?

Hi @or-else,
I deployed latest tinode-mysql docker image (0.15.5-rc5) but still search doesn't not work with username or email address. Only byID works fine.
Searching for demo users like "email:[email protected]" or "tel:17025550001" works fine!

Reproduce it by deploy an instance, create two new users and try to add each other.

Web interface issues

Hi Devs!
We are an Italian associations (3x1t.org) and would like to add a Jabber/XMPP web interface to our web site.
Actually we use Converse.js but not so feel..
And we are searching an alternative.
So, we would like to know if TInode web support OMEMO and the auto chat room discover.
We have try the web interface https://web.tinode.co/# with our server parameters but the connection fails and we don't know why.

If Tinode Web suitable we could contribute to translate on Italian language and install it on our server ;-)

Thanks!

Davide

Having issues regarding running application on local machine

Hi @or-else , While working on #30 , I was facing many problems when I cloned the app and ran the app. I found out that @babel/core and @babel.preset-env modules are outdated and need to be updated for development purpose. Also, one more thing I want to discuss is in the webpack.config.js that test key has value which does not allow npm to transpile .js files (like index.js) which causes errors while running npm scripts (I ran npm run build:dev and got error: You may need an appropriate loader to handle this file type.In the present webpack config file, we have:
rules: [ { test: /src\/.*\.jsx?$/, loaders: [ 'babel-loader', ], exclude: /node_modules/, }, ],

I changed test key value to /\.(js|jsx)$/ and it worked. However, I am not able to run the application on my local machine and for that I installed webpack-dev-server in my devDependency but when I wanted to Sign In, it showed Error: 503.

I know I am quite disturbing 😅 , but if possible, kindly help me figuring this out

c.Drafty.isProcessing is not a function error in devel version

Describe the bug
App builds without any errors, however after building it's not possible to send images or files because of "not a function error". At the same time there is no such problem in master version.

To Reproduce
Steps to reproduce the behavior:

  1. npm install
  2. npm run build

Environment (please complete the following information):

  • OS: Windows 7 Home

Console log
When sending image or file:

TypeError: c.Drafty.isProcessing is not a function
    at ue.ge (chat-message.jsx:182)
    at e (tinode.prod.js:1)
    at Function.a.format (tinode.prod.js:1)
    at ue.render (chat-message.jsx:102)
    at Ie (react-dom.production.min.js:104)
    at rh (react-dom.production.min.js:103)
    at zj (react-dom.production.min.js:228)
    at Th (react-dom.production.min.js:152)
    at tj (react-dom.production.min.js:152)
    at Te (react-dom.production.min.js:146)

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.