~mhall119/ureadit/5.0

« back to all changes in this revision

Viewing changes to models/QReddit/QRObjects.js

  • Committer: Michael Hall
  • Date: 2015-02-08 21:05:46 UTC
  • Revision ID: mhall119@ubuntu.com-20150208210546-sh98u8i5k5m681jw
Lots of work, bump to version 2.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
601
601
    this.toString = function() {
602
602
        return "[object MessageObj]"
603
603
    }
 
604
 
 
605
    this.mark_read = function() {
 
606
        var markConnObj = reddit.getAPIConnection("read_message", {id: this.data.name});
 
607
        markConnObj.onConnection.connect(function(response){
 
608
           markConnObj.success();
 
609
        });
 
610
        return markConnObj;
 
611
    }
 
612
 
 
613
    this.mark_unread = function() {
 
614
        var markConnObj = reddit.getAPIConnection("unread_message", {id: this.data.name});
 
615
        markConnObj.onConnection.connect(function(response){
 
616
           markConnObj.success();
 
617
        });
 
618
        return markConnObj;
 
619
    }
604
620
}
605
621
var UserObj = function(reddit, username) {
606
622