new invite link feature in master; new config options

162 views
Skip to first unread message

Maxwell Salzberg

unread,
Mar 16, 2012, 8:55:48 PM3/16/12
to diaspo...@googlegroups.com
Hey Pod runners.

As an FYI, I am about to merge a new "invite link" functionality into master.

"why are you working on this feature" you might ask?

Good question:

The main reason was because for invite functionality, we were using a gem called "Devise invitalbe".  It was a good idea when we first used it, but customizing proved problematic, as forking the gem meant it would not upgrade cleanly.  We needed to upgrade cleanly, as we want to stay more current with new versions of Rails, which have tons of great features around cleaner code and modularity.

Since our junky fork of Devise Invitable was not updateable, we were forced to remove it.  At the same time, we slightly changed how invites work.  

Now every user has a URL with a default amount of invites on it.  A user can share that link wherever they want, and each time a user signs up, the limit counter is decremented.  User objects are no longer created with each invite, which should make people databases cleaner, and be generally less annoying :)  We also got to delete tons of terrible code!


The default invite count is set in application.yml, under the optional "invite_count" key.  A pod admin can also increase the number of invites for a specific user via the admin panel.


Additionally, admin invites now work slightly differently.  The invite itself will come from the current logged in admin.  If you do not want this to happen, you can specify and admin username to send the invite from the optional "admin_account" key.

You can see the updated application.yml.example for more details on these two new keys.


There are a bunch of features which could be extended for this new, more flexible admin link, so by all means, if you wanted to work on it, I would love to have a conversations to help you contribute!

Thanks again,

Maxwell.

elf Pavlik

unread,
Mar 17, 2012, 5:06:35 AM3/17/12
to diaspora-dev
apologies if i go off topic, it reminded me about quite annoying issue with inviting people from facebook:

if i get invite on facebook with invitation link from someone to 'crate an account' on given pod, but from what i remember if i already have an account on some other pod i don't see a webfinger of person inviting me to share with this person from my existing account =(

if someone who have developed this feature would like to take a look at it awsome! otherwise if i find some time i would try digging into it myself...

~ elf pavlik ~

Blaine

unread,
Mar 17, 2012, 6:39:45 PM3/17/12
to diaspo...@googlegroups.com
I honestly don't know if this is the right place, but since i updated up, i get a very annoying sniplet of code at the beggining of invite's.

#<User id: 1, username: "burwuro", serialized_private_key: "-----BEGIN RSA PRIVATE KEY-----\nMIIJKgIBAAKCAgEA8NG...", getting_started: false, disable_mail: false, language: "en", email: "*********@yahoo.com", encrypted_password: "$2a$10$JiPaAQsCmGxI9mEdI8mMluqPUpu5BS7WlmxhLWsa/SeJ...", invitation_token: nil, invitation_sent_at: nil, reset_password_token: nil, remember_token: nil, remember_created_at: nil, sign_in_count: 3, current_sign_in_at: "2012-03-17 22:25:22", last_sign_in_at: "2012-03-17 19:03:32", current_sign_in_ip: "50.47.91.72", last_sign_in_ip: "**.**.**.**", created_at: "2012-03-17 18:53:27", updated_at: "2012-03-17 22:25:22", invitation_service: nil, invitation_identifier: nil, invitation_limit: nil, invited_by_id: nil, invited_by_type: nil, authentication_token: nil, unconfirmed_email: nil, confirm_email_token: nil, locked_at: nil, show_! community_spotlight_in_stream: true, auto_follow_back: false, auto_follow_back_aspect_id: nil, hidden_shareables: nil>

Maxwell Salzberg

unread,
Mar 17, 2012, 7:42:01 PM3/17/12
to diaspo...@googlegroups.com
Blaine,

Ill nuke that puts in a commit shortly. Thanks for letting me know!

-m

--
You received this message because you are subscribed to the Google Groups "diaspora-dev" group.
To view this discussion on the web visit https://groups.google.com/d/msg/diaspora-dev/-/-2vDBpgqmywJ.

To post to this group, send email to diaspo...@googlegroups.com.
To unsubscribe from this group, send email to diaspora-dev...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/diaspora-dev?hl=en.

Reply all
Reply to author
Forward
0 new messages