incubator-esme-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vdic...@apache.org
Subject svn commit: r735707 - /incubator/esme/trunk/server/src/main/scala/us/esme/model/User.scala
Date Mon, 19 Jan 2009 14:29:13 GMT
Author: vdichev
Date: Mon Jan 19 06:29:13 2009
New Revision: 735707

URL: http://svn.apache.org/viewvc?rev=735707&view=rev
Log:
Disable message about profile change on first login after user creation.

Modified:
    incubator/esme/trunk/server/src/main/scala/us/esme/model/User.scala

Modified: incubator/esme/trunk/server/src/main/scala/us/esme/model/User.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/us/esme/model/User.scala?rev=735707&r1=735706&r2=735707&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/us/esme/model/User.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/us/esme/model/User.scala Mon Jan 19 06:29:13
2009
@@ -51,15 +51,16 @@
   }
 
   private def profileChanged(in: User) {
-    Message.create.author(in.id).
-                   when(Helpers.timeNow.getTime).
-                   source("profile").
-                   setTextAndTags("User " + in.nickname + " changed profile. Name: " + in.wholeName
+ ", Image: " + in.imageUrl, Nil, Empty).
-                   foreach{ msg => 
-                     if (msg.save) {
-                       Distributor ! Distributor.AddMessageToMailbox(in.id, msg, ProfileReason(in.id))

+    if (!in.needsChange_?)
+      Message.create.author(in.id).
+                     when(Helpers.timeNow.getTime).
+                     source("profile").
+                     setTextAndTags("User " + in.nickname + " changed profile. Name: " +
in.wholeName + ", Image: " + in.imageUrl, Nil, Empty).
+                     foreach{ msg => 
+                       if (msg.save) {
+                         Distributor ! Distributor.AddMessageToMailbox(in.id, msg, ProfileReason(in.id))

+                       }
                      }
-                   }
   }
 
   def findFromWeb(uid: String): Box[User] = 



Mime
View raw message