friendsofsymfony / fosmessage Goto Github PK
View Code? Open in Web Editor NEWProvides user-to-user messaging features for PHP applications.
License: MIT License
Provides user-to-user messaging features for PHP applications.
License: MIT License
Hello everyone,
One of the questions we have to ask ourselves is what persistance system do we have / want to support for first release?
I think Doctrine ORM and ODM are clearly needed. However, I don't know very well the popularity of the others.
FOSUserBundle supports Propel. Are there a lot of people using Propel?
Does anyone else use another persistance layer and would like a support for it in the library?
i would like to know reason behind this. Thanks
New message is not added to messages collection in conversation. For example Conversation returned by Sender::startConversation() has empty messages collection. It's fine if we redirect user to another page immediately after conversation, but if we want make some additional stuff it's not convenient.
I know that it may be quite easy change by extending base models, but maybe it is good idea to change default behaviour.
Drupal CMS uses many Symfony components now within Drupal 8, however it's use of Doctrine is limited to Annotations as far as I believe. It does not look like full Doctrine integration will be anytime soon, if ever. See: https://www.drupal.org/node/1817778
This library was highlighted to me in the Drupal.org issue queues for the Message Private module which I maintain. https://www.drupal.org/node/2613152#comment-10697278
When I upgrade Message Private to Drupal 8, which is ongoing, I will look to improve upon it. There is currently no Threading / Conversation ability, so if appropriate, this library could be a great solution.
A few initial questions / discussion items:
Perhaps you could help with answering the above. Some of this work would be a while away on my side, but just to start conversation now will help later on. Thanks.
countMessages method is not implemented in the DriverInterface
i'm trying to use the FOSMessage with symfony , i've download it and configure it however when trying to run composer install i got this error
[InvalidArgumentException] Bundle "fos_message" does not exist or it is not enabled.
i know it is not a bundle yet so do i neet to enable in the symfony appkernel.php ? or what .
I wanted to extend the sender object to overwrite existing methods to match with our business specs.But I can't do, because lots of methods and properties are private. can you please change it to protected so it is easier to overwrite.
I can re-write that to have same effect, but it was best that if it can be avoided.
Hello @tgalopin !
As you can see above if I display the messages like this:
//Controller
$conversations = $this->get('fos_message.repository')->getPersonConversations($this->getUser());
// Template
{% for message in conversation.messages %}
{{ message.id }} :
{{ message.body|truncate }}
<br>
{% endfor %}
So the conversation.messages.last
returns a complete random message from the conversation. Did I miss something out ?
The entity src/Driver/Doctrine/ORM/Entity/Conversation.php
should sort messages by date
or at least by id
.
Hello everyone,
I know most of the use cases of this library will be quite classical: conversation between users. However, some of you may have ideas of what they need that we didn't think of.
Please don't hesitate to propose ideas about this library, about how you would like it to work.
hello ,
can i know how to delete message or conversation , i'm using doctrine ORM.
Hey,
I implemented Fos message with the SF3 while functioning perfectly except when I extend the class FOS\Message\Driver\Doctrine\ORM\Entity\Conversation.
Thanks
Or maybe add fos_message as a prefix to tables
Hey I would love to help with this project.
I actually rewrote the fos messagebundle once
https://github.com/Miliooo/MilioooMessageBundle
It actually works but I wrote that code two years ago and I hate most of the code.
Since messaging is a huge part of my project, I started to refactor the code
https://github.com/Miliooo/MilioMessage
It starts with a command:
https://github.com/Miliooo/MilioMessage/blob/master/src/Commands/CreateThread.php
This gets handled by a handler:
https://github.com/Miliooo/MilioMessage/blob/master/src/Handler/CreateThreadCommandHandler.php
Which then creates a thread model:
https://github.com/Miliooo/MilioMessage/blob/master/src/Model/Thread.php
Sorry error in my code. Can't delete this post. :)
From playing around with the demo I noticed "Conversation Subject". In the cases where someone might want to reproduce a system like the Facebook Messenger; i.e. - no conversation subject, is it possible to bundle messages by recipient rather than Conversation Subject?
i.e. - Is it possible to easily remove Conversation Subject and have Conversations based on receipients without changing so much code?
We are creating new app and I would like to add this into it. I know this will take some time before it can be ready, but the question is when will it be?
Hello,
I saw that the project had been resumed, but little improvement for the moment due to a lack of time no doubt.
So I wanted to know if the project would continue and be compatible with symfony3?
I noticed a small error logic, to write a message to another user, inspecting the input we see the email address of the user instead of his ID, which seems strange to me since we can aspire All the e-mail addresses of a site thanks to this system ...
Thanks for the job done!
hello ,
i've been use this library for testing but i think the documentation and the library still in development as mentioned , so can i easily migrate to this library "FOSMessageBundle" specially i'm using symfony actually i was confused about the difference between them .
While we probably all agree that this library aims to provide user-to-user messaging features, I'm not sure we all have the same idea of what we should really do.
I discussed quite a lot with @ChristianRiesen about this and we worked on an easy to use API for the library. I want to explain here what is our current idea so it can be discussed and adapted to your needs.
We chose to not base our work on the bundle. We didn't want to be restricted in our ideas by the bundle concepts. So even if some ideas will be the same, please keep in mind we want to create a library from scratch.
Conversation
, Message
, PersonInterface
(interface for User model), ConversationPerson
linking conversations and persons and MessagePerson
linking messages and persons ;TagInterface
let the developer implement a tagging system ;Here is how we would like to interact with the library, as a developer: https://gist.github.com/tgalopin/33641d43f200e8010c2a
You can note that there is neither any concept of inbox/outbot nor validation or UI. The library as we plan it is a smart but simple data strcture, and nothing more.
I worked a bit on an implementation of what we had in mind with Christian (https://github.com/tgalopin/message) so the code can help you see how the library would work from our perspective.
I am very interested by your opinions about this plan: what do you think the library should be? What was your idea when you thought of a framework-agnostic messaging library? Does this plan fit your needs?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.