Hi there, thanks for the excellent module, there’s just one problem regarding the way i want to use it.

It seems if I specify a list of appointed users (called advisors) in a view and make this the view for the friends list then all users on the site can talk to the appointed users (advisors) but then the advisors are not able to talk back as the non-appointed users do not show in the clickable list.

If you haven't guessed already, we really want to use this module to allow registered users to get live advice from our education and course advisors. We only want to show the advisors who are online to registered users but if registered users start a conversation with an advisor then we need that user to appear in the friends list for the advisor which they have started the conversation with.

I hope this makes sense.

I have filed this as a bug because i think what I've explained above is a minor flaw in the way the module works but we (city college norwich) would be willing to pay the module developer a small donation if he is able to fix this issue in the next week or two. Please contact me and specify a price for the work and I will check if we can afford it.

CommentFileSizeAuthor
#4 im_consultation.tar_.gz2.15 KBpahariwalla
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pahariwalla’s picture

Issue tags: +clean-up

Sorry for the delay in response. I've had to neglect this module over the last 3 months and am now desperately trying to catch up. Let me verify your requirements:

1) Registered users will only ever see Advisors in their Friend Picker
2) Advisors will see other Advisors and only the registered users that have sent them a message

Although this is almost doable with the module as is (using the hook_im_friends), there is one problem: there's nor really any way to "close" a conversation, so the Advisor's friend picker will continue to show all users whom with Advisor has ever had a conversation.

I think this will require a modification to the module, but it may not be too hard if it's ok to delete the messages in the conversation. I haven't really properly dealt with the "clean up", so I'll definitely keep this use case in mind. My hunch is that I need to allow users to delete conversations, but there are some issues with that.

Anyway, this is a good use case as I can see that it may have value in other applications.

pahariwalla’s picture

Issue tags: +friendpicker

tagging

peter panes’s picture

Yes that's exactly how we want it to work.

Don't know if its possible but I'm thinking it might be best if conversations are hidden after a configurable amount of time, so if there's no activity for 15 mins, the user is hidden from the friend picker, but then if the user starts a conversation with the same advisor again then both parties will see the previous messages.

Being able to configure the amount of time before messages get deleted (after inactivity) would also be desirable.

So something like hide after 15mins, delete after 1 hour would be perfect.

pahariwalla’s picture

Category: bug » feature
Status: Active » Needs review
FileSize
2.15 KB

OK ... so I went a little overboard. It was just a great little problem, and although I was planning on implementing a very simple solution, as I was testing it out, I kept coming up with use cases to stretch the "preferences" beyond a simple adjustable "timeout" and ended up with a pretty nifty little system. Having my current work with chatrooms still populating my local dev environment also spurred some ideas.

Since it will take some re-thinking and coding to include this "temporal consultancy" within the generic IM framework, I've build a small module that "hooks" into IM to provide the functionality.

Here's what you need to do:

  1. Download the attached tarball (im_consultation.info and im_consultation.module) and unzip into your contrib modules folder
  2. Go to admin/build/modules and enable "IM Consultation"
  3. Go to admin/settings/im and look inside the main fieldset "Friend Picker Options"
  4. Set the Source to "function im_consultation_im_friends()"
  5. Within this fieldset, note a new sub-fieldset labeled "Consultation format options" - go nuts ...

I hope that the field names and descriptions are intuitive comprehensible, but as they are probably not, please do post your questions. p.s. I'm not a very good tester ...;-)

I'm wondering if this gives you functionlity you're looking for, and maybe more. I really like the option of incorporating chatrooms into the mix. My imaginary use case is students posting questions in the chatroom and hooking up with advisors and then going off on their own individual chats with them.

I'm looking forward to feedback.

As to your offer to help support the cause - I would not refuse anything that might appear in my paypal pahariwalla@gmail.com account, so if you're so inclined please do as you feel fit. Like I said, it was a (mostly) fun exercise, and I did get a little carried away.

peter panes’s picture

Thanks so much it works exactly as we want except for one problem, it doesn't seem to work when i set the "Role for Client:" to authenticated user.

If i change the "Role for Client" to another role then it all works as expected but we really want anyone with an account to speak to advisors without being given an additional role.

peter panes’s picture

Sorry i should have explained it further, basically, the username for the "Client" doesn't show in the friend picker for the "Advisor" when the "Role for Client" is set to authenticated user, everything else works.

pahariwalla’s picture

Status: Needs review » Needs work

I think I know what you are saying, and I'll take a look at it. hmm... very strange indeed.