This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static int TYPES_likeFeed = 100; | |
public static int TYPES_commentFeed = 101; | |
public static int TYPES_liveNow = 200; | |
public static int TYPES_followedYou = 300; | |
public static int TYPES_chatMessage = 500; | |
public static int TYPES_chatSticker = 501; | |
public static int TYPES_chatFile = 502; | |
public static int TYPES_chatLocation = 503; | |
public static int TYPES_chatFreeCall = 504; | |
public static int TYPES_chatVideoCall = 505; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
router.get("/chat/:conversationId/history/android", function(req, res, next) { | |
// params | |
var conversationId = req.params.conversationId; | |
var pageParams = ModelMethod.getPageParams(req.query); | |
// sequel | |
var base = squel.select() | |
.field("ch.id") | |
.field("ch.conversation_id", "conversationId") | |
.field("ch.sender_id", "senderId") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Elasticquent\ElasticquentTrait; | |
class Post extends Eloquent{ | |
use ElasticquentTrait; | |
/** | |
* The database table used by the model. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header('Content-type:text/html; charset=utf-8'); | |
ini_set('display_errors', 'Off'); | |
include("noti.php"); | |
// http://armymax.com/api/noti/?title=ArmyMax%20Conference&m=arai%20na&f=31&n=ArmyMax1&t=1&type=500 | |
// http://armymax.com/api/noti/?title=ArmyMax%20Conference&m=arai%20na%20to%20all&f=31&n=ArmyMax1&t=1&type=500&all=1 | |
$TYPES_loveFeed = 100; | |
$TYPES_commentFeed = 101; | |
$TYPES_liveNow = 200; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header('Content-type:application/json; charset=utf-8'); | |
ini_set('display_errors', 'Off'); | |
include("noti.php"); | |
$TYPES_likeFeed = 100; | |
$TYPES_commentFeed = 101; | |
$TYPES_liveNow = 200; | |
$TYPES_followedYou = 300; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require('request'); | |
var titile = "คุณได้รับข้อความใหม่"; | |
var sender = {id: 6,name:"Hey"}; | |
var message = "นาย " + sender.name + " ได้กดถูกใจคุณ"; | |
var receiverId = 3082; | |
var notiType = 100; | |
request({ | |
//uri: "http://api.vdomax.com/noti/", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static function notifySocial($from_id,$from_name,$to_id,$type,$post_id,$all=false) | |
{ | |
$TYPES_likeFeed = 100; | |
$TYPES_commentFeed = 101; | |
$TYPES_shareFeed = 102; | |
$TYPES_reportFeed = 103; | |
$TYPES_liveNow = 200; // ?? | |
$TYPES_followedYou = 300; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
//Dep | |
var request = require('request'); | |
var Q = require("q"); | |
var app = require("./app"); | |
var lodash = require("lodash"); | |
var Model = app.get("Model"); | |
var http = require("http"); | |
/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function notiMessage(notiType) { | |
var message = ""; | |
if(notiType == 500) { | |
message = " ได้ส่งข้อความหาคุณ"; | |
} else | |
if(notiType == 501) { | |
message = " ส่งแทตทูหาคุณ"; | |
} else if(notiType == 502) { | |
message = " ส่งรูปภาพหาคุณ"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Order | |
extends Eloquent | |
{ | |
protected $table = "order"; | |
protected $guarded = ["id"]; | |
protected $softDelete = true; |