owncloud-archive / chat

GNU Affero General Public License v3.0
38 stars 21 forks source link

Implementing Chat Framework + Contacts app integration #28

Closed LEDfan closed 10 years ago

LEDfan commented 10 years ago

Like discussed in #14 we are converting this app to a reusable Chat Framework.

Note that Och stands for ownCloud Handle

Preparation:

LEDfan commented 10 years ago

Creating Chat Framework

LEDfan commented 10 years ago

Implementing Och into the Chat Framework

LEDfan commented 10 years ago

Implementing support for several backends

LEDfan commented 10 years ago

TODO:

LEDfan commented 10 years ago

I have finally implemented the contacts app and the chat framework. Although there are some issues it works great :) @jancborchardt @owncloud/designers can you review the design of the following screenshots?

  1. This is how the app looks on startup. The contacts which supports the default backend are showed. schermafbeelding 2014-02-28 op 14 31 37
  2. To start a conversation by using another backend, the user must click the "Backend" button on the right bottom. Like you can see the OC handle is marked so it's enabled. By clicking another backend, all users which supports that backend will be showed. schermafbeelding 2014-02-28 op 14 33 55
  3. 1-1 Conversation schermafbeelding 2014-02-28 op 14 38 16
  4. Inviting a user. Note that the backend switcher at the bottom is hided. IMHO a message above the contacts is needed like in (1). schermafbeelding 2014-02-28 op 14 39 11

Performance

The next step is to implement an Contacts backend.

jancborchardt commented 10 years ago

@LEDfan dude, it’s already possible to chat through email!? That’s awesome! :)

There are a few small layout things which we can fix @owncloud/designers

@LEDfan but there’s one fundamental thing: The »Backend« switch – it shouldn’t be there. As a user, I don’t know what »Backend« is, and I don’t want to filter my friends by the means of contact they use. Priority is communicating with a person, and the protocol is second. That should be handled in the conversation itself. Similar to iMessage on iOS – it’s both SMS and data. When internet is available and your chat partner uses iOS as well, they automatically use data (blue background of the message). When not, it’s SMS (green background). But it’s all in one conversation with that person. That’s important.

@LEDfan we can have a call about that if you like. :) I could do tomorrow.

LEDfan commented 10 years ago

@LEDfan dude, it’s already possible to chat through email!? That’s awesome! :)

Unfortunately not..., I added it for testing the backend registering and switch.

About the backend swichter. Would you like to have the same thing like iMessage? So that there are messages in a conversation send by E-mail and by owncloud?

jancborchardt commented 10 years ago

@LEDfan yeah, very similar to iMessage. A conversation should always include all messages with a person (or a group of people), regardless of the protocol. However, there should be:

  1. if there is only one suitable protocol for that person, indicate which one it is (for example, the »Send« button should say »Send via Email«)
  2. If there are multiple protocols, just use one of them, and preselect that on the Send button. In that case the send button should be a dropdown where you can select »Send via Email« or »Send via ownCloud« or »Send via XMPP« for example. Also, whenever the means of transport changes there could be an indication that for example all following messages are sent via Email.

Does that make sense? Essentially, the »Backend« setting should be converted from a global setting to a per-message switch inside the conversation. Which ideally does not need to be used or paid attention to because the defaults will work.

LEDfan commented 10 years ago

Mmm, It does make sense, but I'm not (yet) convinced of the advantages over the disadvantages of that system. Let say user1 is in a conversation with user2. They both are possible to communicate via E-mail and Facebook. The inial messages are send over E-mail, because the user2 is offline on Facebook. But then user2 is online on Facebook so the messages are send over Facebook. Wouldn't this cause many problems? Like user1 open his E-mail box and find messages, but when he tries to reply on those message those messages of course doesn't appear on Facebook. Vice versa, user2 wants to read all messages he received form user1 of that conversation and he opens Facebook, but the first messages are send over E-mail.

How can this be solved? Or am I miss understanding something?

jancborchardt commented 10 years ago

So, in this case I assume user1 uses ownCloud Chat and user2 does not.

But then user2 is online on Facebook so the messages are send over Facebook.

This wouldn’t happen. If previous messages have been sent through email, that would continue. Only once the other party (the one not using ownCloud) changes means of communication, it’s changed.

Makes sense?

jbtbnl commented 10 years ago

Are we considering email as a communication channel for chat? It could become quite confusing as the person receiving messages by email is likely to expect that rich formatted text will display correctly at the other side.

The reason I'd like to contact someone by email via chat is when I don't know any of his/her chat accounts. Shouldn't we just send an invitation, link to a public ownCloud page where the receiving person is requested to enter one of their chat accounts and then save this data in the corresponding contacts entry?

The above will be more work to implement initially but it will prevent ownCloud users expecting a full blown email client from the chat app.

jancborchardt commented 10 years ago

Of course we will start out with the simplest form of email: plain text only. For normal emailing between regular people, not many folks use HTML mails anyway – and those who do are annoying. The formatting will be taken care of by the receiver’s mail program.

The connection process you describe is too cumbersome, because:

TL;DR we’re not building a full-blown email client, and no one will expect that from an app called »Chat«. :) If anything, we’re building a simpler email client with less unused features and less annoying stuff.

LEDfan commented 10 years ago

I understand, but I was thinking of this: user1 chat with user2 via owncloud chat. But user1 also send emails (via the Chat app) to user2. All e-mails with the same subject are stored in a conversation. That's why I added the backend switcher. So when using this approach you can have multiple conversations with one person.

I think this is more logical. I for instance send emails about one subject to a person, but I also chat with them about different subjects.

jancborchardt commented 10 years ago

@LEDfan it should not be possible to have multiple conversations with one person. One person is one person, that’s it. Just like on Skype, Jabber or other messaging apps – you can’t have multiple »conversations«. There are no such thing as subjects.

Again: We are not building a »classic email app« – we’re just using Email as the open transport protocol.

Does that clear it up? :)

LEDfan commented 10 years ago

Hehe yes. But I thought we are going to support multiple protocols? Like XMPP, IRC etc? What if a user wants to chat with a user over different protocols? Or isn't that the intention?

jancborchardt commented 10 years ago

Yeah, multiple protocols would be supported. But no matter what the protocol – if it’s the same person, the messages should be in the same conversation. Like in iMessage where SMS and messages sent through iCloud are just in the same stream.

There is no such thing as a subject. When using chat to communicate with someone not on ownCloud, and that protocol happens to be email, the subject could be automatically generated from the first part of the message.

Does that make it clear? As said, I’d be happy to have a call with you so we can clarify stuff. :)

stefan-niedermann commented 10 years ago

Let say user1 is in a conversation with user2. They both are possible to communicate via E-mail and Facebook. The inial messages are send over E-mail, because the user2 is offline on Facebook. But then user2 is online on Facebook so the messages are send over Facebook. Wouldn't this cause many problems? Like user1 open his E-mail box and find messages, but when he tries to reply on those message those messages of course doesn't appear on Facebook. Vice versa, user2 wants to read all messages he received form user1 of that conversation and he opens Facebook, but the first messages are send over E-mail.

Hi @LEDfan, maybe i can clear this up: i think @jancborchardt wants to say the following: Situation: user1 (OC-User) has a contact (user2) with many information (e-mail, facebook, xmpp). Owncloud should now select automatically on of these protocols on initating a conversation with user2. this protocol should not be changed automatically by owncloud (depending if user2 is online in facebook or not). but user1 should be able to switch the initial protocol manually, if he wants and thinks it makes sense. This avoids the problem you described above.

And now comes the "IMHO-Part" ;-) even if e-mail is the maybe most common protocol, it shouldn't be default, but the last fallback. Most users (sort of user2) like more to communicate via facebook and so, but not via "e-mail". sure, e-mails will arrive, but e-mail is not ideal for chat for many reasons.

jancborchardt commented 10 years ago

@stefan-niedermann yeah, good point in the »IMHO part«. ;) Email indeed should be the last fallback if there are better instant messaging options.

LEDfan commented 10 years ago

All things are implemented.

jancborchardt commented 10 years ago

WOHOOO! @LEDfan great progress there. :)