示例#1
0
 public VerseMessageParticipant addNewParticipantToThread(VerseMessageThread vmt, long participant_id)
 {
     DateTime datetime = DateTime.Now;
     VerseMessageParticipant vmp = new VerseMessageParticipant(-1,vmt.thread_id,participant_id,datetime,DateTime.MinValue);
     ParticipantTask pt = new ParticipantTask(us, vmp);
     pt.AddParticipantToThread();
     VerseThreadManager.getInstance().addParticipant(vmt,vmp);
     return vmp;
 }
示例#2
0
 public VerseMessageParticipant addParticipantToThread(VerseMessageThread vmt, long participant_id, DateTime datetime_joined, DateTime datetime_last_read)
 {
     VerseMessageParticipant vmp = new VerseMessageParticipant(-1, vmt.thread_id, participant_id, datetime_joined, datetime_last_read);
     ParticipantTask pt = new ParticipantTask(us, vmp);
     //TODO change this not to be done in thread.
     pt.AddParticipantToThread();
     VerseThreadManager.getInstance().addParticipant(vmt, vmp);
     return vmp;
 }
示例#3
0
 public void removeParticipantFromThread(VerseMessageThread vmt)
 {
     long user_id = us.user_profile.id;
     if (vmt.getParticipant(user_id) != null)
     {
         VerseMessageParticipant vmp = vmt.getParticipant(user_id);
         ParticipantTask pt = new ParticipantTask(us, vmp);
         //TODO change this not to be done in thread.
         pt.RemoveParticipantFromThread();
         VerseThreadManager.getInstance().removeParticipant(vmt, vmp);
     }
 }